Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow settings to be deleted

  • Loading branch information...
commit e05472eddb884d19ffa490570202cb91a49f34e2 1 parent bf93e5f
@remy remy authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 public/js/jsbin.js
View
4 public/js/jsbin.js
@@ -37,6 +37,10 @@ function throttle(fn, delay) {
window['jsbin'] || (window['jsbin'] = {});
// dodgy?
var storedSettings = localStorage.getItem('settings');
+if (storedSettings === "undefined") {
+ // yes, equals the *string* "undefined", then something went wrong
+ storedSettings = null;
+}
window.jsbin['settings'] = $.extend(JSON.parse(storedSettings || '{}'), jsbin['settings']);
Please sign in to comment.
Something went wrong with that request. Please try again.