Last active
April 8, 2024 20:15
-
-
Save anttikuuskoski/a04f81735b63b0b17ad41d19a49fe97b to your computer and use it in GitHub Desktop.
Shelly 1.2.2 firmware console issue example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Shelly firmware 1.2.2 issue; tested on Pro3EM */ | |
let counter = 0; | |
function breaksIt(i) { | |
console.log('break ' + i); | |
} | |
function worksBut(a) { | |
console.log('func ' + a + ' ' + (counter++) ); | |
//breaksIt('whatever'); // uncommenting this line will cause the first worksBut call to show nothing. | |
} | |
worksBut(1); | |
worksBut(2); | |
worksBut(3); | |
worksBut(4); | |
//When L9 commented, prints out: | |
/* | |
func 1 | |
func 2 | |
func 3 | |
func 4 | |
*/ | |
//When L9 uncommented, prints out: | |
/* | |
break whatever | |
func 2 | |
break whatever | |
func 3 | |
break whatever | |
func 4 | |
break whatever | |
*/ | |
// In other words, the first two console log calls were never performed or printed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment