Skip to content

Commit

Permalink
Merge pull request emberjs#16562 from bekzod/cleanup-component
Browse files Browse the repository at this point in the history
correct conditionals in `component`
  • Loading branch information
krisselden authored May 17, 2018
2 parents ff5cf32 + 544cc64 commit 2d6579a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/ember-glimmer/lib/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,10 @@ const Component = CoreView.extend(
}

let args = this[ARGS];
let reference = args && args[key];
let reference = args !== undefined ? args[key] : undefined;

if (reference) {
if (reference[UPDATE]) {
reference[UPDATE](get(this, key));
}
if (reference !== undefined && reference[UPDATE] !== undefined) {
reference[UPDATE](get(this, key));
}
},

Expand Down Expand Up @@ -653,13 +651,10 @@ const Component = CoreView.extend(
let isSVG = element.namespaceURI === SVG_NAMESPACE;
let { type, normalized } = normalizeProperty(element, name);

if (isSVG) {
if (isSVG || type === 'attr') {
return element.getAttribute(normalized);
}

if (type === 'attr') {
return element.getAttribute(normalized);
}
return element[normalized];
},

Expand Down

0 comments on commit 2d6579a

Please sign in to comment.