fix: check href null

This commit is contained in:
YuKun Liu committed 2022-01-18 23:25:45 +08:00
1 parent 327f901548
commit 2073b400df
1 file changed
+1 -1
+1 -1
View File
@@ -366,7 +366,7 @@ class Interpreter {
if (should_prevent_default !== `onclick`) {
if(element.tagName == "A") {
const href = event.target.getAttribute("href")
if (href !== "" || href !== null) {
if (href !== "" && href !== null && href !== undefined) {
rpc.call("browser_open", {
mounted_dom_id: parseInt(real_id),
href: event.target.getAttribute("href")