fix: Always convert duration to a number
This commit is contained in:
parent
8152c172a9
commit
e526a60bfd
1 changed files with 3 additions and 0 deletions
|
@ -15,6 +15,9 @@ class Activity extends Entry {
|
|||
// Set a default date value.
|
||||
this.date = this.date ? this.date : new Date(Date.now());
|
||||
this.set_date(this.date);
|
||||
|
||||
// Convert the duration to a number if it isn't.
|
||||
(this.duration) ? this.duration = parseInt(this.duration) : null;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue