From 461f142db0e9111672e5528770546052a7a1ec30 Mon Sep 17 00:00:00 2001 From: alpaca-tc Date: Wed, 1 Dec 2021 21:54:02 +0900 Subject: [PATCH] stringToUtf8Bytes may return null --- doublearray.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doublearray.js b/doublearray.js index 149ef05..88b97b3 100644 --- a/doublearray.js +++ b/doublearray.js @@ -551,6 +551,10 @@ var buffer = stringToUtf8Bytes(key); + if (buffer === null) { + return [] + } + var parent = ROOT_ID; var child = NOT_FOUND;