From 0f348a7e074c47f011dd2c453537caa7550bfdac Mon Sep 17 00:00:00 2001 From: mehbark Date: Mon, 17 Apr 2023 16:49:51 -0400 Subject: [PATCH] use in operator (thanks puw4) --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 9315f6b..06acd07 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -261,7 +261,7 @@ const INITIAL_STATE: State = { }; function steps(state: State, ops: Op[], limit = 300, num_steps = 0): State[] { - if (typeof ops[state.ip] == "undefined" || num_steps > limit) { + if (!(state.ip in ops) || num_steps > limit) { return [state]; } return cons(