fix: 🐛 toarray deprecation warning (#1865)

This commit is contained in:
Dharini Jeeva authored and GitHub committed 2023-08-25 09:43:02 -07:00
1 parent 638753d7bc
commit 3f731867ac
5 files changed
+12 -8

No files matched your search

@@ -5,12 +5,17 @@
import { registerDeprecationHandler } from '@ember/debug';
const deprecationList = [
'ember-data:deprecate-early-static',
'ember-data:deprecate-array-like',
];
export function initialize() {
registerDeprecationHandler((message, options, next) => {
// TODO: fix `deprecate-early-static` warning before ember 5 upgrade
// TODO: fix `deprecate-early-static` and `deprecate-array-prototype-extension` warning before ember 5 upgrade
//silence deprecate-early-static warnings till we find a way to
//fix ember-cli-mirage discoverEmberDataModels
if (options?.id === 'ember-data:deprecate-early-static') {
if (options?.id && deprecationList.includes(options.id)) {
return;
}
if (options?.url) {