Skip to content

Commit

Permalink
Merge pull request #2177 from bgantzler/fixHasEmberData
Browse files Browse the repository at this point in the history
Fix regex that checks if ember data is present to allow for difference in namespace
  • Loading branch information
Turbo87 authored Apr 30, 2021
2 parents 965097a + 2f53902 commit e9af35e
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 e9af35e

Please sign in to comment.