app/components/lookbook/dimensions_display/component.js in lookbook-2.0.0.beta.3 vs app/components/lookbook/dimensions_display/component.js in lookbook-2.0.0.beta.4
- old
+ new
@@ -16,16 +16,13 @@
}
},
createObserver() {
if (this.target) {
- this.observer = observeSize(
- document.querySelector(targetSelector),
- ({ width, height }) => {
- this.width = width;
- this.height = height;
- }
- );
+ this.observer = observeSize(this.target, ({ width, height }) => {
+ this.width = width;
+ this.height = height;
+ });
}
},
tearDown() {
if (this.observer) {