diff --git a/lib/backends/kv-backend.js b/lib/backends/kv-backend.js index fd42aece..a7903f51 100644 --- a/lib/backends/kv-backend.js +++ b/lib/backends/kv-backend.js @@ -1,6 +1,7 @@ 'use strict' const AbstractBackend = require('./abstract-backend') +const { get, hasIn } = require('lodash') /** Key Value backend class. */ class KVBackend extends AbstractBackend { @@ -61,11 +62,11 @@ class KVBackend extends AbstractBackend { return } - if (!(property in parsedValue)) { + if (!(hasIn(parsedValue, property))) { throw new Error(`Could not find property ${property} in ${key}`) } - value = parsedValue[property] + value = get(parsedValue, property) } if (isBinary) {