Don't forget to decode location.hash before it can be used for a comparison.

fixes #282
This commit is contained in:
Antoine Nguyen
2012-06-28 13:29:10 +02:00
parent e03a363024
commit b72c410a67
+4 -2
View File
@@ -203,11 +203,13 @@ History.prototype = {
},
check: function() {
if (this.serialized == location.hash && this.force === undefined) {
var decodedhash = decodeURIComponent(location.hash);
if (this.serialized == decodedhash && this.force === undefined) {
return;
}
delete(this.force);
this.from_string(decodeURIComponent(location.hash));
this.from_string(decodedhash);
if (!this.serialized) {
location.hash = this.options.deflocation;
return;