Skip to content

Commit

Permalink
fix encapsulation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Aug 17, 2022
1 parent 9a2a921 commit 36340c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { V2CACHE_SINGLETON_RECORD_DATA } from '@ember-data/canary-features';
import { RecordData } from '@ember-data/record-data/-private';
import Store from '@ember-data/store';

export default class DefaultStore extends Store {
createRecordDataFor(identifier, storeWrapper) {
if (V2CACHE_SINGLETON_RECORD_DATA) {
// @ts-expect-error
this.__private_singleton_recordData = this.__private_singleton_recordData || new RecordData(storeWrapper);
this.__private_singleton_recordData.createCache(identifier);
return this.__private_singleton_recordData;
}
return new RecordData(identifier, storeWrapper);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
import { V2CACHE_SINGLETON_RECORD_DATA } from '@ember-data/canary-features';
import { RecordData } from '@ember-data/record-data/-private';
import Store from '@ember-data/store';

export default class DefaultStore extends Store {
createRecordDataFor(identifier, storeWrapper) {
if (V2CACHE_SINGLETON_RECORD_DATA) {
// @ts-expect-error
this.__private_singleton_recordData = this.__private_singleton_recordData || new RecordData(storeWrapper);
this.__private_singleton_recordData.createCache(identifier);
return this.__private_singleton_recordData;
}
return new RecordData(identifier, storeWrapper);
}
}

0 comments on commit 36340c8

Please sign in to comment.