Skip to content

Commit 72942cb

Browse files
committed
chore(hook): allow also to hook without adding any extension
1 parent c9c49d0 commit 72942cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/migration.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var Migration = Skeleton.extend({
3737
Migration.registerHook = function(plugin, internals) {
3838

3939
var plugin = plugin.hook('migrator:migration:hook:require');
40-
internals.parser = internals.parse || {
40+
internals.parser = internals.parser || {
4141
filesRegEx: filesRegEx,
4242
extensions: 'js'
4343
};
@@ -52,8 +52,9 @@ Migration.registerHook = function(plugin, internals) {
5252
})
5353
.each(function(parser) {
5454

55-
internals.parser.extensions = internals.parser.extensions + '|' +
56-
parser.extensions;
55+
if(parser && parser.extensions)
56+
internals.parser.extensions = internals.parser.extensions + '|' +
57+
parser.extensions;
5758
})
5859
.then(function() {
5960
internals.parser.filesRegEx = new RegExp(

0 commit comments

Comments
 (0)