@ember-data/model 4.12.1 → 4.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/addon/-private.js CHANGED
@@ -1,5 +1,5 @@
1
- import { M as Model } from "./has-many-5e2df095";
2
- export { E as Errors, L as LEGACY_SUPPORT, R as ManyArray, P as PromiseBelongsTo, c as PromiseManyArray, a as attr, b as belongsTo, h as hasMany } from "./has-many-5e2df095";
1
+ import { M as Model } from "./has-many-c1bfdebf";
2
+ export { E as Errors, L as LEGACY_SUPPORT, R as ManyArray, P as PromiseBelongsTo, c as PromiseManyArray, a as attr, b as belongsTo, h as hasMany } from "./has-many-c1bfdebf";
3
3
  import { getOwner } from '@ember/application';
4
4
 
5
5
  /*
@@ -911,6 +911,9 @@ class RelatedCollection extends RecordArray {
911
911
  this.push(record);
912
912
  return record;
913
913
  }
914
+ destroy() {
915
+ super.destroy(false);
916
+ }
914
917
  }
915
918
  RelatedCollection.prototype.isAsync = false;
916
919
  RelatedCollection.prototype.isPolymorphic = false;
@@ -3055,6 +3058,11 @@ function isInvalidError(error) {
3055
3058
  let Tag = (_class$1 = class Tag {
3056
3059
  constructor() {
3057
3060
  _initializerDefineProperty(this, "ref", _descriptor$1, this);
3061
+ if (macroCondition(getOwnConfig().env.DEBUG)) {
3062
+ const [base, prop] = arguments;
3063
+ this._debug_base = base;
3064
+ this._debug_prop = prop;
3065
+ }
3058
3066
  this.rev = 1;
3059
3067
  this.isDirty = true;
3060
3068
  this.value = undefined;
@@ -3087,7 +3095,8 @@ function getTag(record, key) {
3087
3095
  tags = Object.create(null);
3088
3096
  Tags.set(record, tags);
3089
3097
  }
3090
- return tags[key] = tags[key] || new Tag();
3098
+ // @ts-expect-error
3099
+ return tags[key] = tags[key] || (macroCondition(getOwnConfig().env.DEBUG) ? new Tag(record.constructor.modelName, key) : new Tag());
3091
3100
  }
3092
3101
  function peekTag(record, key) {
3093
3102
  let tags = Tags.get(record);