Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
creepy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Petr Balga
creepy
Commits
11ff0e7a
Commit
11ff0e7a
authored
Feb 02, 2020
by
Petr Balga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When input NaN, show 0 instead of "NaN"
parent
12dfd48b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
wp-content/themes/CreepyTheme/js/money.js
wp-content/themes/CreepyTheme/js/money.js
+2
-0
No files found.
wp-content/themes/CreepyTheme/js/money.js
View file @
11ff0e7a
...
...
@@ -21,7 +21,9 @@ $(document).ready(function(){
function
calculation
(
action
)
{
var
currency
=
$
(
'
.select__currency
'
).
attr
(
'
currency
'
);
var
dollars
=
parseInt
(
$
(
'
.dollar
'
).
val
().
replace
(
'
$
'
,
''
).
replace
(
'
,
'
,
''
));
if
(
isNaN
(
dollars
)){
dollars
=
0
;
}
var
amount
=
parseInt
(
$
(
'
.input__currency
'
).
val
().
replace
(
prefixes
[
currency
],
''
).
replace
(
'
,
'
,
''
));
if
(
isNaN
(
amount
)){
amount
=
0
;
}
var
vypocet
=
0
;
switch
(
action
){
case
'
multiple
'
:
//From dollar to other
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment