Skip to content

Commit

Permalink
fix: debounce fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 20, 2018
1 parent 6fb6eea commit 241646d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default class UpdateCommand extends Command {
const lastrunfile = path.join(this.config.cacheDir, 'lastrun')
const m = await this.mtime(lastrunfile)
m.setHours(m.getHours() + 1)
if (m < new Date()) {
if (m > new Date()) {
await cli.log(`waiting until ${m.toISOString()} to update`)
await wait(60 * 1000) // wait 1 minute
return this.debounce()
Expand Down

0 comments on commit 241646d

Please sign in to comment.