fix: check href null

This commit is contained in:
YuKun Liu 2022-01-18 23:25:45 +08:00
parent 327f901548
commit 2073b400df

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")