Handle case when price is not a number

And return a `null` if so.
This commit is contained in:
Jean-Baptiste Bellet
2021-06-08 09:46:24 +02:00
parent 3ebba9502a
commit 0cb2739139
2 changed files with 9 additions and 1 deletions

View File

@@ -129,3 +129,6 @@ describe 'convert string to number with configurated currency', ->
it "undefined case ", ->
expect(filter(undefined)).toEqual null
it "wtf case", ->
expect(filter("wtf")).toEqual null