Skip to content

Commit 55bd727

Browse files
committed
Add check for string type for getVariableDescriptors function
1 parent 5712caa commit 55bd727

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "oci-metrics-datasource",
33
"private": true,
4-
"version": "3.0.2",
4+
"version": "3.0.3",
55
"description": "Oracle Cloud Infrastructure Metrics Data Source for Grafana",
66
"main": "index.js",
77
"scripts": {

src/datasource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ export default class OCIDatasource {
787787
const vars = this.templateSrv.variables || [];
788788

789789
if (regex) {
790-
let regexVars = vars.filter((item) => item.query.match(regex) !== null);
790+
let regexVars = vars.filter((item) => _.isString(item.query) && item.query.match(regex) !== null);
791791
if (includeCustom) {
792792
const custom = vars.filter(
793793
(item) => item.type === "custom" || item.type === "constant"

src/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
},
3030
{ "name": "UPL", "url": "https://oss.oracle.com/licenses/upl" }
3131
],
32-
"version": "3.0.2",
33-
"updated": "2022-02-09"
32+
"version": "3.0.3",
33+
"updated": "2022-02-10"
3434
},
3535

3636
"dependencies": {

0 commit comments

Comments
 (0)