Move back let number; to satisfy linter requirements
This commit is contained in:
parent
9606da7648
commit
028a6c737c
@ -99,6 +99,8 @@ class Ingredient {
|
|||||||
* @param {string} type - The name of the data type.
|
* @param {string} type - The name of the data type.
|
||||||
*/
|
*/
|
||||||
static prepare(data, type) {
|
static prepare(data, type) {
|
||||||
|
let number;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "binaryString":
|
case "binaryString":
|
||||||
case "binaryShortString":
|
case "binaryShortString":
|
||||||
@ -116,7 +118,7 @@ class Ingredient {
|
|||||||
if (data === null) return data;
|
if (data === null) return data;
|
||||||
if (isNaN(data)) throw "Ingredient can not be empty.";
|
if (isNaN(data)) throw "Ingredient can not be empty.";
|
||||||
|
|
||||||
let number = parseFloat(data);
|
number = parseFloat(data);
|
||||||
if (isNaN(number)) {
|
if (isNaN(number)) {
|
||||||
const sample = Utils.truncate(data.toString(), 10);
|
const sample = Utils.truncate(data.toString(), 10);
|
||||||
throw "Invalid ingredient value. Not a number: " + sample;
|
throw "Invalid ingredient value. Not a number: " + sample;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user