diff --git a/addon/-private/system/class-meta.js b/addon/-private/system/class-meta.js index 383a46d3cee..08827179511 100644 --- a/addon/-private/system/class-meta.js +++ b/addon/-private/system/class-meta.js @@ -1,5 +1,7 @@ import EmptyObject from 'ember-data/-private/system/empty-object'; +const NULL_RESOLUTION = new EmptyObject(); + export default class ClassMeta { constructor(store, modelName) { this.modelName = modelName; @@ -24,10 +26,10 @@ export default class ClassMeta { get modelClass() { if (!this._modelClass) { - this._modelClass = this._store.modelFor(this.modelName); + this._modelClass = this._store.modelFor(this.modelName) || NULL_RESOLUTION; } - return this._modelClass; + return this._modelClass === NULL_RESOLUTION ? null : this._modelClass; } /* deprecated way of accessing modelClass */