Skip to content
Permalink
Browse files

default date to current if parse fails

  • Loading branch information...
Manuel-777 committed May 28, 2019
1 parent 2a226d4 commit e62ab205a9486e6df2d91162c684444aa5a5344e
Showing with 1 addition and 1 deletion.
  1. +1 −1 window_background/background-util.js
@@ -41,7 +41,7 @@ function parseWotcTime(dateStr) {

if (!date || isNaN(date.getTime())) {
console.log(`Invalid date ('${dateStr}') - using current date as backup.`);
date = new Date(dateStr);
date = new Date();
}
return date;
}

0 comments on commit e62ab20

Please sign in to comment.
You can’t perform that action at this time.