diff --git a/app/core/Engine.ts b/app/core/Engine.ts index 8f666a0333e..b7fb1a10a9c 100644 --- a/app/core/Engine.ts +++ b/app/core/Engine.ts @@ -1340,7 +1340,8 @@ class Engine { for (const controller of controllers) { if ( hasProperty(initialState, controller.name) && - hasProperty(controller, 'subscribe') && + // Use `in` operator here because the `subscribe` function is one level up the prototype chain + 'subscribe' in controller && controller.subscribe !== undefined ) { // The following type error can be addressed by passing initial state into controller constructors instead