Improved error handling.
This commit is contained in:
parent
6970999d92
commit
db89f942c6
2 changed files with 4 additions and 4 deletions
|
@ -65,8 +65,8 @@ class App.UiElement.date
|
|||
item
|
||||
|
||||
@format: (number) ->
|
||||
if parseInt(number) < 10
|
||||
number = "0#{number}"
|
||||
if number isnt '' && Number(number) < 10
|
||||
number = "0#{Number(number)}"
|
||||
number
|
||||
|
||||
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->
|
||||
|
|
|
@ -79,8 +79,8 @@ class App.UiElement.datetime
|
|||
item
|
||||
|
||||
@format: (number) ->
|
||||
if parseInt(number) < 10
|
||||
number = "0#{number}"
|
||||
if number isnt '' && Number(number) < 10
|
||||
number = "0#{Number(number)}"
|
||||
number
|
||||
|
||||
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->
|
||||
|
|
Loading…
Reference in a new issue