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") {
|
||||
event.preventDefault();
|
||||
if (should_prevent_default !== `onclick`) {
|
||||
console.log(event.target.getAttribute("href"));
|
||||
if(element.tagName == "A") {
|
||||
rpc.call("browser_open", {
|
||||
mounted_dom_id: parseInt(real_id),
|
||||
href: event.target.getAttribute("href")
|
||||
})
|
||||
const href = event.target.getAttribute("href")
|
||||
if (href !== "" || href !== null) {
|
||||
rpc.call("browser_open", {
|
||||
mounted_dom_id: parseInt(real_id),
|
||||
href: event.target.getAttribute("href")
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user