(no title)
adam_ellsworth | 4 years ago
Concerning this line: https://github.com/arkadiyt/zoom-redirector/blob/master/back... Why is it sometimes returning undefined? (or is that known)?
Cheers!
adam_ellsworth | 4 years ago
Concerning this line: https://github.com/arkadiyt/zoom-redirector/blob/master/back... Why is it sometimes returning undefined? (or is that known)?
Cheers!
arkadiyt|4 years ago
Sure thing. All browser extension source code is available to you anyhow, even if the author doesn't publish it.
> Why is it sometimes returning undefined?
Looks like a simple bug as some folks below have pointed out. It doesn't impact the functionality of the extension in any way here.
squeaky-clean|4 years ago
cipherboy|4 years ago
> const match = /^\/[js]\/(\d+)\/?$/.exec("something")
> undefined
vinayakpandey|4 years ago
chrismorgan|4 years ago
Also match[1] will never be undefined: it’ll either throw an exception, or be a string. No, this is just a bug, a poorly written guard that fails to guard what it was supposed to, and I suppose an exception is just silently swallowed and treated equivalently to the intended early return. But the clause should be changed to just `if (!match) return;` or similar.