simsalabim/sisyphus

Sisyphus not restoring falshish values

Closed this issue · 1 comments

This is something that I fixed with my CKEDITOR and TinyMCE integration, but which did not make into 1.1.1. The problem is as follows: If you have a field with an initial value, and then delete that value, Sisyphus does not restore the empty string, but shows the initial value. This is because resque is written as follows:

if ( resque ) {
    self.restoreFieldsData( field, resque );
    restored = true;
}

Apparently, if the saved value is an empty string, this evaluates to false. We should not check this like this but instead

if (resque !== null) {

Best regards,
Tommi

Thanks, fixed!