From b17df4a78d271b5d0fec9ea70290e0c0cd0627d6 Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Tue, 3 May 2022 12:57:22 -0700 Subject: [PATCH] fixes JSONPath missing variable typo (#4754) --- plugins/insomnia-plugin-os/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/insomnia-plugin-os/index.js b/plugins/insomnia-plugin-os/index.js index dd65430b00..8ac3bfdc49 100644 --- a/plugins/insomnia-plugin-os/index.js +++ b/plugins/insomnia-plugin-os/index.js @@ -1,5 +1,5 @@ const os = require('os'); -const {JSONPath} = require('jsonpath-plus'); +const { JSONPath } = require('jsonpath-plus'); const FILTERABLE = ['userInfo', 'cpus']; @@ -32,9 +32,9 @@ module.exports.templateTags = [ run(context, fnName, filter) { let value = os[fnName](); - if (jsonPath && FILTERABLE.includes(fnName)) { + if (JSONPath && FILTERABLE.includes(fnName)) { try { - value = JSONPath({json: value, path: filter})[0]; + value = JSONPath({ json: value, path: filter })[0]; } catch (err) {} }