Skip to content

Commit

Permalink
replaced Number.isNaN() with globalThis.isNaN()
Browse files Browse the repository at this point in the history
  • Loading branch information
honzi committed Jun 6, 2024
1 parent 48a79a3 commit 71fda46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ function update_display(){
function update_from1(color){
const color_element = core_elements[color + '-1'];
let color_value = color_element.value;
if(Number.isNaN(color_value)
if(globalThis.isNaN(color_value)
|| color_value < 0
|| color_value > 1){
color_value = 0;
Expand All @@ -406,7 +406,7 @@ function update_from1(color){
function update_from255(color){
const color_element = core_elements[color + '-255'];
let color_value = color_element.value;
if(Number.isNaN(color_value)
if(globalThis.isNaN(color_value)
|| color_value < 0
|| color_value > 255){
color_element.value = 0;
Expand Down

0 comments on commit 71fda46

Please sign in to comment.