From b0c346b76cc8cd303b9e04e2deebda455eee9761 Mon Sep 17 00:00:00 2001 From: Michael Noonan Date: Wed, 4 Dec 2013 18:15:05 +1000 Subject: [PATCH] cookie and notify are not defined When trying to remove a cookie I noticed that the cookie wasn't being removed. Upon further inspection I saw that the function was relying on the local "cookie" variable which wasn't copied across from the initialization code. Same seems to be true for "notify". Cookies can now be removed happily. --- angular-local-storage.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/angular-local-storage.js b/angular-local-storage.js index abbfbd8..7143ea2 100644 --- a/angular-local-storage.js +++ b/angular-local-storage.js @@ -37,6 +37,9 @@ angularLocalStorage.provider('localStorageService', function(){ this.$get = ['$rootScope', function($rootScope){ var prefix = this.prefix; + var cookie = this.cookie; + var notify = this.notify; + // If there is a prefix set in the config lets use that with an appended period for readability if (prefix.substr(-1) !== '.') { prefix = !!prefix ? prefix + '.' : '';