From c9356a683714a8ae8879aa7cd39ee8256c756768 Mon Sep 17 00:00:00 2001 From: Maximilian Antoni <mail@maxantoni.de> Date: Tue, 30 Oct 2018 12:05:52 +0100 Subject: [PATCH] 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. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f21bd913..45effedc 100644 --- a/index.js +++ b/index.js @@ -129,7 +129,7 @@ Choo.prototype.start = function () { var href = location.href var hash = location.hash if (href === window.location.href) { - if (!this._hashEnabled && hash) scrollToAnchor(hash) + if (!self._hashEnabled && hash) scrollToAnchor(hash) return } self.emitter.emit(self._events.PUSHSTATE, href)