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
|
item
|
||||||
|
|
||||||
@format: (number) ->
|
@format: (number) ->
|
||||||
if parseInt(number) < 10
|
if number isnt '' && Number(number) < 10
|
||||||
number = "0#{number}"
|
number = "0#{Number(number)}"
|
||||||
number
|
number
|
||||||
|
|
||||||
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->
|
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->
|
||||||
|
|
|
@ -79,8 +79,8 @@ class App.UiElement.datetime
|
||||||
item
|
item
|
||||||
|
|
||||||
@format: (number) ->
|
@format: (number) ->
|
||||||
if parseInt(number) < 10
|
if number isnt '' && Number(number) < 10
|
||||||
number = "0#{number}"
|
number = "0#{Number(number)}"
|
||||||
number
|
number
|
||||||
|
|
||||||
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->
|
@setNewTime: (item, attribute, diff, reset = false, tolerant = false) ->
|
||||||
|
|
Loading…
Reference in a new issue