From fd44e21bf86a11e42c3662a3a19bd9d6dbc0ada9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Steunou?= Date: Wed, 2 Mar 2016 10:00:32 +0100 Subject: [PATCH] Remove use of deprecated $.selector --- src/region.js | 2 +- test/unit/region.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/region.js b/src/region.js index eb61ec0162..441ec558a7 100644 --- a/src/region.js +++ b/src/region.js @@ -112,7 +112,7 @@ const Region = MarionetteObject.extend({ if (this.getOption('allowMissingEl')) { return false; } else { - throw new MarionetteError('An "el" ' + this.$el.selector + ' must exist in DOM'); + throw new MarionetteError(`An "el" must exist in DOM for this region ${this.cid}`); } } return true; diff --git a/test/unit/region.spec.js b/test/unit/region.spec.js index 2d2b6137ac..8367606125 100644 --- a/test/unit/region.spec.js +++ b/test/unit/region.spec.js @@ -79,7 +79,7 @@ describe('region', function() { it('should throw an exception saying an "el" doesnt exist in DOM', function() { expect(function() { this.region.show(new this.MyView()); - }.bind(this)).to.throw('An "el" #not-existed-region must exist in DOM'); + }.bind(this)).to.throw('An "el" must exist in DOM for this region ' + this.region.cid); }); it('should not have a view', function() {