From f807eed46628655dea76b575d1592ebcbfcdd221 Mon Sep 17 00:00:00 2001 From: Seph Gentle <me@josephg.com> Date: Wed, 8 Apr 2020 17:41:45 +1000 Subject: [PATCH] Fixed getKey issue in bindingtester to match old behaviour --- scripts/bindingtester.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/bindingtester.ts b/scripts/bindingtester.ts index 9769f0d..4a4bbce 100755 --- a/scripts/bindingtester.ts +++ b/scripts/bindingtester.ts @@ -257,7 +257,8 @@ const makeMachine = (db: Database, initialName: Buffer) => { const keySel = await popSelector() const prefix = await popBuffer() - const result = (await oper.getKey(keySel)) as Buffer + const result = ((await oper.getKey(keySel)) || Buffer.from([])) as Buffer + // if (verbose) { // console.log('get_key prefix', nodeUtil.inspect(prefix.toString('ascii')), result!.compare(prefix)) // console.log('get_key result', nodeUtil.inspect(result!.toString('ascii')), result!.compare(prefix))