Skip to content

Commit

Permalink
Fix regex that checks if ember data is present to allow for differenc…
Browse files Browse the repository at this point in the history
…e in namespace
  • Loading branch information
cah-brian-gantzler committed Apr 29, 2021
1 parent b24f066 commit 2f53902
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addon/utils/ember-data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* global requirejs */

function _hasEmberData() {
let matchRegex = /^ember-data/i;
return !!(Object.keys(requirejs.entries).find(e => !!e.match(matchRegex)));
let matchRegex1 = /^ember-data/i;
let matchRegex2 = /^@ember-data/i;

return !!(Object.keys(requirejs.entries).find(e => !!e.match(matchRegex2) || !!e.match(matchRegex1) ));
}

/**
Expand Down

0 comments on commit 2f53902

Please sign in to comment.