diff --git a/src/model.js b/src/model.js index 5fd18257..79dfec5a 100644 --- a/src/model.js +++ b/src/model.js @@ -52,7 +52,7 @@ export class Path { if (i >= 0) { const [left = null, current = null, right = null] = path.slice(i - 1, i + 2); - return [left, current, right]; + return [left ?? null, current, right ?? null]; } return [null, null, null];