From 18d627baba239bbef8b4d936600789d7046a4310 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 12 Feb 2015 11:55:52 +0000 Subject: [PATCH] Add missing localStorage.coffee... oops --- .../web/public/coffee/modules/localStorage.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 services/web/public/coffee/modules/localStorage.coffee diff --git a/services/web/public/coffee/modules/localStorage.coffee b/services/web/public/coffee/modules/localStorage.coffee new file mode 100644 index 0000000000..2eeecc9b29 --- /dev/null +++ b/services/web/public/coffee/modules/localStorage.coffee @@ -0,0 +1,12 @@ +angular.module("localStorage", []) + .value "localStorage", (args...) -> + ### + localStorage can throw browser exceptions, for example if it is full + We don't use localStorage for anything critical, on in that case just + fail gracefully. + ### + try + return $.localStorage args... + catch e + console.error "localStorage exception", e + return null \ No newline at end of file