assets/unpoly/unpoly.js in unpoly-rails-2.4.0 vs assets/unpoly/unpoly.js in unpoly-rails-2.4.1

- old
+ new

@@ -6,11 +6,11 @@ /*** @module up */ window.up = { - version: '2.4.0' + version: '2.4.1' }; /***/ }), /* 2 */ @@ -6517,16 +6517,19 @@ this.savedTitle = document.title; this.savedLocation = up.history.location; } } restoreHistory() { + if (!this.showsLiveHistory()) { + return; + } if (this.savedLocation) { + // We cannot use the `this.title` setter as that does not + // push a state if `newLocation === this.savedLocation`. up.history.push(this.savedLocation); - this.savedLocation = null; } if (this.savedTitle) { document.title = this.savedTitle; - this.savedTitle = null; } } /*- Temporarily changes the [current layer](/up.layer.current) while the given function is running. \ No newline at end of file