diff --git a/src/index.js b/src/index.js index 35bc9fb..53560e2 100644 --- a/src/index.js +++ b/src/index.js @@ -226,6 +226,8 @@ exports.reload = tryWrap((id, options) => { record.Ctor.extendOptions = options } const newCtor = record.Ctor.super.extend(options) + // prevent record.options._Ctor from being overwritten accidentally + newCtor.options._Ctor = record.options._Ctor record.Ctor.options = newCtor.options record.Ctor.cid = newCtor.cid record.Ctor.prototype = newCtor.prototype