好好好

This commit is contained in:
shenjack-5600u 2024-05-05 21:51:06 +08:00
parent 8b17ad745f
commit f6bab07200
Signed by: shenjack
GPG Key ID: FDF9864E11C7E79F

View File

@ -21,9 +21,9 @@ const assets_data = {
};
const run_env = {
from_code: typeof window == "undefined",
is_node: typeof Bun == "undefined",
is_bun: typeof Bun != "undefined",
from_code: typeof window === "undefined",
is_node: typeof Bun === "undefined",
is_bun: typeof Bun !== "undefined",
cli_args: [],
};
@ -185,7 +185,7 @@ if (run_env.from_code) {
querySelector(tag) {
// 搜索一下有没有这个元素
for (let i = 0; i < this.childList.length; i++) {
if (this.childList[i].tag == tag) {
if (this.childList[i].tag === tag) {
return this.childList[i];
}
}
@ -210,7 +210,7 @@ if (run_env.from_code) {
// 搜索一下有没有这个元素
logger.debug("querySelector", tag);
for (let i = 0; i < stored_elements.length; i++) {
if (stored_elements[i].tag == tag) {
if (stored_elements[i].tag === tag) {
return stored_elements[i];
}
}