| Index: third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
|
| diff --git a/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js b/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
|
| index 7a5ea6abed4b0e5578a9b86e3ab8c8dd62bb0110..549aadf39b19c50ccce58ec0bf12897f653750a3 100644
|
| --- a/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
|
| +++ b/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
|
| @@ -143,22 +143,23 @@
|
|
|
| _observeRoute: function() {
|
| // TODO(nevir) https://github.com/Polymore/more-routing/issues/24
|
| - if (this._routeObserver) this._routeObserver.close();
|
| - if (this._paramObserver) this._paramObserver.close();
|
| + if (this._routeListener) {
|
| + this._routeListener.close();
|
| + this._routeListener = null;
|
| + }
|
| + if (this._paramListener) {
|
| + this._paramListener.close();
|
| + this._paramListener = null;
|
| + }
|
| if (!this.route) return;
|
|
|
| - this._routeObserver = new CompoundObserver();
|
| - this._routeObserver.addPath(this.route, 'active');
|
| - this._routeObserver.open(function() {
|
| - this._setActive(this.route.active);
|
| + this._routeListener = this.route.__subscribe(function() {
|
| + this._setActive(this.route && this.route.active);
|
| }.bind(this));
|
|
|
| - this._paramObserver = new ObjectObserver(this.route.params);
|
| - this._paramObserver.open(function(added, removed, changed, getOldValue) {
|
| - var keys = Object.keys(added).concat(Object.keys(removed)).concat(Object.keys(changed));
|
| - keys.forEach(function(key) {
|
| - this.notifyPath('params.' + key, this.params[key]);
|
| - }.bind(this));
|
| + this._paramListener = this.route.params.__subscribe(function(key, value) {
|
| + // https://github.com/Polymer/polymer/issues/1505
|
| + this.notifyPath('params.' + key, value);
|
| }.bind(this));
|
| },
|
|
|
|
|