From 4d7e03538331bfa0b9937cc389dc8aa7d9b8b3a0 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Wed, 22 Oct 2014 18:37:50 +0200 Subject: [PATCH] Fixed browsing settings deserialization --- public_html/js/BrowsingSettings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public_html/js/BrowsingSettings.js b/public_html/js/BrowsingSettings.js index 957e18aa..5311ba43 100644 --- a/public_html/js/BrowsingSettings.js +++ b/public_html/js/BrowsingSettings.js @@ -53,7 +53,11 @@ App.BrowsingSettings = function( } try { - settings = JSON.parse(string); + if (typeof(string) === 'string' || string instanceof String) { + settings = JSON.parse(string); + } else { + settings = string; + } } catch (e) { } }