Skip to content

Commit

Permalink
fixes boolean settings save mismatch #626
Browse files Browse the repository at this point in the history
  • Loading branch information
danielweck committed Jun 8, 2017
1 parent 8d46014 commit 51b4e61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/js/EpubReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ BookmarkData){
{
if (SettingsDialog.defaultSettings.hasOwnProperty(prop))
{
if (!settings.reader.hasOwnProperty(prop) || !settings.reader[prop]) {
if (!settings.reader.hasOwnProperty(prop) || (typeof settings.reader[prop] == "undefined")) {
settings.reader[prop] = SettingsDialog.defaultSettings[prop];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/ReaderSettingsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ define(['./ModuleConfig', 'hgn!readium_js_viewer_html_templates/settings-dialog.
readerSettings = readerSettings || defaultSettings;
for (prop in defaultSettings)
{
if (defaultSettings.hasOwnProperty(prop) && !readerSettings.hasOwnProperty(prop) && !readerSettings[prop])
if (defaultSettings.hasOwnProperty(prop) && (!readerSettings.hasOwnProperty(prop) || (typeof readerSettings[prop] == "undefined")))
{
readerSettings[prop] = defaultSettings[prop];
}
Expand Down

0 comments on commit 51b4e61

Please sign in to comment.