429 var eventY = clientY - rect.top
430
431 var x = Math.floor(eventX * ((canvas.width / rect.width) || 1) / g)
432 var y = Math.floor(eventY * ((canvas.height / rect.height) || 1) / g) 433
434 return infoGrid[x][y]
435 }
428 var eventX = clientX - rect.left
429 var eventY = clientY - rect.top
430
431 var x = Math.floor(eventX * ((canvas.width / rect.width) || 1) / g) 432 var y = Math.floor(eventY * ((canvas.height / rect.height) || 1) / g)
433
434 return infoGrid[x][y]
17 /*global browser */
18 let gettingItem = browser.storage.sync.get('debugStr');
19 gettingItem.then((res) => {
20 document.querySelector("#debugStr").value = res.debugStr || 'Not Found';21 });
22
23 let ex = browser.storage.sync.get('ExperimentalLayout');
Expressions that consistently result in either true or false when comparing values, and logical operations like ||, &&, and ?? that consistently either skip or fully evaluate their operands, often indicate mistakes. Logical operations that always yield the same result could lead to unexpected behavior or bugs in the program.
const arrIsEmpty = someArr === [] // Will always evaluate to false
const arrIsEmpty = someArr.length === 0