diff --git a/src/module/module-collection.js b/src/module/module-collection.js index a68f05a51..30bc97522 100644 --- a/src/module/module-collection.js +++ b/src/module/module-collection.js @@ -49,7 +49,7 @@ export default class ModuleCollection { unregister (path) { const parent = this.get(path.slice(0, -1)) const key = path[path.length - 1] - if (!parent.getChild(key).runtime) return + if (!parent.getChild(key) || !parent.getChild(key).runtime) return parent.removeChild(key) }