Skip to content

Commit

Permalink
Use isDescendant
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed Jul 23, 2016
1 parent 5627a55 commit b9944fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/bind/accessors.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

_clearPath: function(path) {
for (var prop in this.__data__) {
if (prop.indexOf(path + '.') === 0) {
if (Polymer.Path.isDescendant(path, prop)) {
this.__data__[prop] = undefined;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/standard/notify-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@
_notifyBoundPaths: function(path, value) {
for (var a in this._boundPaths) {
var b = this._boundPaths[a];
if (path.indexOf(a + '.') == 0) {
if (Path.isDescendant(a, path)) {
this._notifyPath(Path.translate(a, b, path), value);
} else if (path.indexOf(b + '.') == 0) {
} else if (Path.isDescendant(b, path)) {
this._notifyPath(Path.translate(b, a, path), value);
}
}
Expand Down

0 comments on commit b9944fe

Please sign in to comment.