From 9b379a79761dd3d0e5766776e79c8cdcc58a7036 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 14 Nov 2016 20:21:44 +0200 Subject: [PATCH] Fix initial sidebar display --- resources/views/header.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index 49579b14fb..9fbaca07d6 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -310,14 +310,14 @@ }); if (isStorageSupported()) { - var storage = localStorage.getItem('show_' + side + '_sidebar'); + var storage = localStorage.getItem('show_' + side + '_sidebar') || '0'; var toggled = $("#wrapper").hasClass("toggled-" + side) ? '1' : '0'; if (storage != toggled) { setTimeout(function() { $("#wrapper").toggleClass("toggled-" + side); $.post('{{ url('save_sidebar_state') }}?show_' + side + '=' + storage); - }, 100); + }, 200); } } }