Commit 01674815 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Use isInteger rather them division

parent c844603b
/*jslint nomen: true, maxlen: 200, indent: 2, unparam: true*/
/*global window, rJS, domsugar, Boolean, btoa, atob */
/*global window, rJS, domsugar, Boolean, btoa, atob, Number */
(function (window, rJS, domsugar, Boolean, btoa, atob) {
(function (window, rJS, domsugar, Boolean, btoa, atob, Number) {
"use strict";
function render_selection(json_field, default_value, is_required, editable) {
......@@ -137,7 +137,7 @@
return true;
}
parsed_value = parseFloat(value);
if (!isNaN(parsed_value) && ((parsed_value % 1) === 0)) {
if (!isNaN(parsed_value) && (Number.isInteger(parsed_value))) {
return true;
}
return false;
......@@ -669,4 +669,4 @@
});
}, {mutex: 'statechange'});
}(window, rJS, domsugar, Boolean, btoa, atob));
}(window, rJS, domsugar, Boolean, btoa, atob, Number));
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1008.44140.3254.1792</string> </value>
<value> <string>1008.44146.47863.60757</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -302,7 +302,7 @@
</tuple>
<state>
<tuple>
<float>1685133283.74</float>
<float>1685377921.85</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment