diff --git a/addon/container-debug-adapter.js b/addon/container-debug-adapter.js index 070099ee..9029839c 100644 --- a/addon/container-debug-adapter.js +++ b/addon/container-debug-adapter.js @@ -81,7 +81,7 @@ if (typeof ContainerDebugAdapter !== 'undefined') { for (let i = 0, l = moduleNames.length; i < l; i++) { let key = moduleNames[i]; - if(key.indexOf(type) !== -1) { + if(key.indexOf(type) !== -1 && key.indexOf('npm:') !== 0) { // Check if it's a pod module var name = getPod(type, key, this.namespace.podModulePrefix || prefix); if (!name) { diff --git a/tests/unit/container-debug-adapter-test.js b/tests/unit/container-debug-adapter-test.js index 8d9316ae..3a0a2cd1 100644 --- a/tests/unit/container-debug-adapter-test.js +++ b/tests/unit/container-debug-adapter-test.js @@ -110,3 +110,10 @@ test("Pods podModulePrefix support", function(assert) { assert.equal(models[0], 'user', "the name is correct"); assert.equal(models[1], 'users/user', "the name is correct"); }); + +test('Ignores browserify modules', function(assert) { + assert.expect(1); + def('npm:cool/model/package'); + var models = containerDebugAdapter.catalogEntriesByType('model'); + assert.equal(models.length, 0, 'Ignores the browserify modules'); +});