Fix wrong this usage in nanohref integration (#689)
I currently see `TypeError: undefined is not an object (evaluating 'this._hashEnabled')` being thrown by clients. This should fix it.
This commit is contained in:
committed by
Renée Kooi
parent
f5f8ccf0cb
commit
c9356a6837
@@ -129,7 +129,7 @@ Choo.prototype.start = function () {
|
|||||||
var href = location.href
|
var href = location.href
|
||||||
var hash = location.hash
|
var hash = location.hash
|
||||||
if (href === window.location.href) {
|
if (href === window.location.href) {
|
||||||
if (!this._hashEnabled && hash) scrollToAnchor(hash)
|
if (!self._hashEnabled && hash) scrollToAnchor(hash)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
self.emitter.emit(self._events.PUSHSTATE, href)
|
self.emitter.emit(self._events.PUSHSTATE, href)
|
||||||
|
|||||||
Reference in New Issue
Block a user