Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NormanTUD committed Feb 22, 2024
1 parent 504edae commit e48694d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,15 +1006,22 @@ async function change_width_or_height(name, inputshape_index) {
return;
}

var value = parse_int($("#" + name).val());
var value = $("#" + name).val();

assert(typeof(value) == "number", `${value} is not a number, but ${typeof(value)}`);

if(!value) {
if(!("" + value).length) {
err("[change_width_or_height] value is not defined");
return;
}

if(!looks_like_number(value)) {
err(`[change_width_or_height] Value "${value}" does not look like a number`);
return;
}

value = parse_int(value);

assert(typeof(value) == "number", `${value} is not a number, but ${typeof(value)}`);

if(value == eval(name)) {
return;
}
Expand Down

0 comments on commit e48694d

Please sign in to comment.