Fix typo in Model.nestRemoting

Prevent apps from crashing when using `Model.nestRemoting` without
`{ hooks: false }` option.

Note that it is not possible to reproduce this bug using our current
Mocha test suite, because other tests modify the global state in such
way that the bug no longer occurs.
This commit is contained in:
Tim Needham 2016-01-17 14:42:38 +00:00 committed by Miroslav Bajtoš
parent 58f32dd70e
commit 159aaf5afa
1 changed files with 2 additions and 2 deletions

View File

@ -806,8 +806,8 @@ module.exports = function(registry) {
listenerTree.before = listenerTree.before || {};
listenerTree.after = listenerTree.after || {};
var beforeListeners = remotes.listenerTree.before[toModelName] || {};
var afterListeners = remotes.listenerTree.after[toModelName] || {};
var beforeListeners = listenerTree.before[toModelName] || {};
var afterListeners = listenerTree.after[toModelName] || {};
sharedClass.methods().forEach(function(method) {
var delegateTo = method.rest && method.rest.delegateTo;