Skip to content

Commit 4ea8e33

Browse files
committed
fix: *ifite* native type mismatch
1 parent f4adde0 commit 4ea8e33

File tree

3 files changed

+7
-29
lines changed

3 files changed

+7
-29
lines changed

.dockerignore

Lines changed: 0 additions & 21 deletions
This file was deleted.

lib/runtime.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
FunctionValue,
1515
} from "@kin-lang/kin";
1616

17-
1817
export function matchType(arg: RuntimeVal): any {
1918
switch (arg.type) {
2019
case "string":
@@ -219,12 +218,12 @@ export function createWebEnv(
219218
const obj = args[0] as ObjectVal;
220219
const target = (args[1] as StringVal).value;
221220
let found = false;
222-
for (const val of obj.properties.values()) {
221+
obj.properties.forEach((val) => {
222+
if (found) return;
223223
if ((val as any).value === target) {
224224
found = true;
225-
break;
226225
}
227-
}
226+
});
228227
return MK_BOOL(found);
229228
})
230229
)

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)