Permalink
Browse files

Encapsulate code in anonymous closure to prevent leaking global varia…

…bles.
  • Loading branch information...
1 parent 31ea3bc commit d83b84f7a900a0c23234398939a7e87dd53ccd58 @dwt dwt committed Oct 4, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 backbone.localStorage.js
View
4 backbone.localStorage.js
@@ -1,3 +1,4 @@
+(function() {
/**
* Backbone localStorage Adapter v1.0
* https://github.com/jeromegn/Backbone.localStorage
@@ -101,4 +102,5 @@ window.Store.sync = Backbone.sync = function(method, model, options, error) {
} else {
options.error("Record not found");
}
-};
+};
+})();

0 comments on commit d83b84f

Please sign in to comment.