From 0791cc3c2a875ded33ca5f3daa388e63d47317f9 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Wed, 21 Jan 2015 16:59:32 +1100 Subject: [PATCH] Making sure that we have a .path() in HashNavigation --- .../darkswarm/services/hash_navigation.js.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/darkswarm/services/hash_navigation.js.coffee b/app/assets/javascripts/darkswarm/services/hash_navigation.js.coffee index d6fd3525ee..2cf6ad588b 100644 --- a/app/assets/javascripts/darkswarm/services/hash_navigation.js.coffee +++ b/app/assets/javascripts/darkswarm/services/hash_navigation.js.coffee @@ -1,9 +1,14 @@ Darkswarm.factory 'HashNavigation', ($location) -> new class HashNavigation - hash: null + hash: null + + constructor: -> + # Make sure we have a path as hashes + # dont seem to work so well without them + $location.path("") if !$location.path() active: (hash)-> - $location.hash() == hash + $location.hash() == hash navigate: (hash)-> @hash = hash