fix: check href null
This commit is contained in:
1 parent
8089023a6c
commit
327f901548
1 file changed
+7
-5
@@ -364,12 +364,14 @@ class Interpreter {
|
|||||||
if (event.type == "click") {
|
if (event.type == "click") {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (should_prevent_default !== `onclick`) {
|
if (should_prevent_default !== `onclick`) {
|
||||||
console.log(event.target.getAttribute("href"));
|
|
||||||
if(element.tagName == "A") {
|
if(element.tagName == "A") {
|
||||||
rpc.call("browser_open", {
|
const href = event.target.getAttribute("href")
|
||||||
mounted_dom_id: parseInt(real_id),
|
if (href !== "" || href !== null) {
|
||||||
href: event.target.getAttribute("href")
|
rpc.call("browser_open", {
|
||||||
})
|
mounted_dom_id: parseInt(real_id),
|
||||||
|
href: event.target.getAttribute("href")
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user