Open ReyRod opened 1 year ago
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch strapi-plugin-migrations@1.0.3 for the project I'm working on.
strapi-plugin-migrations@1.0.3
Here is the diff that solved my problem:
diff --git a/node_modules/strapi-plugin-migrations/server/services/migrations.js b/node_modules/strapi-plugin-migrations/server/services/migrations.js index 5a8dc1c..7b301f8 100644 --- a/node_modules/strapi-plugin-migrations/server/services/migrations.js +++ b/node_modules/strapi-plugin-migrations/server/services/migrations.js @@ -84,7 +84,8 @@ module.exports = ({ strapi }) => ({ getVersionFromFile(filename) { const regex = this.getFileRegex() - return filename.match(regex)[1] ? Number(filename.match(regex)[1]) : 0 + const matches = filename.match(regex); + return matches && matches[1] ? Number(filename.match(regex)[1]) : 0 }, checkIfTheFileNameIsAutorized(file) {
This issue body was partially generated by patch-package.
https://github.com/TonyDeplanque/strapi-plugin-migrations/pull/11
Looks like my PR got merged, so hopefully fixes your issue too!
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
strapi-plugin-migrations@1.0.3
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
https://github.com/TonyDeplanque/strapi-plugin-migrations/pull/11