Skip to content

Commit

Permalink
Merge pull request #72 from remotestorage/bugfix/fix_null_error
Browse files Browse the repository at this point in the history
Don't try to call `getTime()` on null
  • Loading branch information
raucao authored Nov 24, 2017
2 parents 8f3c48d + bf3932f commit 986698e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ Widget.prototype = {
},

updateLastSyncedOutput () {
if (!this.lastSynced) { return } // don't do anything when we've never synced yet
let now = new Date();
let secondsSinceLastSync = Math.round((now.getTime() - this.lastSynced.getTime())/1000);
let subHeadlineEl = document.querySelector('.rs-box-connected .rs-sub-headline');
Expand Down

0 comments on commit 986698e

Please sign in to comment.