From 2eabf0450c44dc822ac37e53a1cd1ce7474f5b53 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 1 Oct 2012 16:20:58 -0400 Subject: [PATCH] fixing unescaped regex --- backbone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.js b/backbone.js index 418fc7d2..91ee6002 100644 --- a/backbone.js +++ b/backbone.js @@ -1059,7 +1059,7 @@ // opened by a non-pushState browser. this.fragment = fragment; var loc = this.location; - var atRoot = (loc.pathname.replace(/[^/]$/, '$&/') === this.root) && !loc.search; + var atRoot = (loc.pathname.replace(/[^\/]$/, '$&/') === this.root) && !loc.search; // If we've started off with a route from a `pushState`-enabled browser, // but we're currently in a browser that doesn't support it...