From 76eeafcc3a321ad20e45e98edbb54b03a0647821 Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Mon, 4 Jun 2012 12:44:16 -0400 Subject: [PATCH] Skip pushState tests with 'file:' protocol. --- test/router.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/router.js b/test/router.js index ec360ffb..decd9438 100644 --- a/test/router.js +++ b/test/router.js @@ -4,7 +4,9 @@ $(document).ready(function() { var lastRoute = null; var lastArgs = []; - var pushState = window.history && window.history.pushState; + var pushState = window.location.protocol !== 'file:' && + window.history && + window.history.pushState; var pathname = window.location.pathname; function onRoute(router, route, args) {