Skip to content

Commit

Permalink
throw error on negative/NaN arity
Browse files Browse the repository at this point in the history
  • Loading branch information
mi2ebi committed Nov 13, 2024
1 parent c8366a8 commit e7a735f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ function search(q) {
for (var i = 0; i < terms.length; i++) {
const t = terms[i];
if (t.colon && !["head", "body", "user", "score", "id", "scope", "arity", "not"].includes(t.op)) {
return {"err": "bu jıq mıjóaıchase «<code>" + t.op + "</code>»"};
return {"err": "bu jıq mıjóaıchase « <code>" + t.op + "</code> »"};
} else if (["/", "arity"].includes(t.op) && !(+t.v >= 0)) {
return {"err": "bu tıozıu mí « <code>" + t.v + "</code> » (kïo tıao máo kóam kı)"};
}
if (["!", "-", "not"].includes(t.op)) {
pass[i] = true;
Expand Down

0 comments on commit e7a735f

Please sign in to comment.