Skip to content

Commit

Permalink
storing prefixes fix, global var fix
Browse files Browse the repository at this point in the history
  • Loading branch information
simsalabim committed Nov 8, 2011
1 parent f835bbb commit 0c2ab55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sisyphus.js
Expand Up @@ -93,7 +93,7 @@ var Sisyphus =(function() {
var restored = false;
var targetFormId = protectedFields.parents( "form" ).attr( "id" );
protectedFields.each( function() {
field = $(this);
var field = $(this);
var prefix = self.href + targetFormId + field.attr( "name" ) + self.options.customKeyPrefix;
var resque = localStorage.getItem( prefix );
if (resque) {
Expand Down Expand Up @@ -230,7 +230,7 @@ var Sisyphus =(function() {
protectedFields.each( function() {
var elem = $( this );
if ( elem.is( ":text" ) || elem.is( "textarea" ) ) {
var prefix = self.href + elem.parents( "form" ).attr( "id" ) + field.attr( "name" ) + self.options.customKeyPrefix;
var prefix = self.href + elem.parents( "form" ).attr( "id" ) + elem.attr( "name" ) + self.options.customKeyPrefix;
try {
localStorage.setItem( prefix, elem.val() );
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion sisyphus.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0c2ab55

Please sign in to comment.