From d054c2ab17bb2ff9d24ffdfa24b031439ce1f85b Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 13 May 2013 21:18:33 +0200 Subject: jsrrdgraph: RrdGraph.js: fix undefined 2nd argument of RrdVdef function This fixes this error: > TypeError: Cannot call method 'indexOf' of undefined at new RrdVdef --- js/RrdGraph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/RrdGraph.js b/js/RrdGraph.js index 9b8e3db..6bd75c9 100644 --- a/js/RrdGraph.js +++ b/js/RrdGraph.js @@ -249,7 +249,7 @@ RrdGraphDesc.prototype.vdef = function (graph, vname, rpn) if (graph.gdes[this.vidx].gf != RrdGraphDesc.GF_DEF && graph.gdes[this.vidx].gf != RrdGraphDesc.GF_CDEF) { throw new RrdGraphDescError('variable "'+name+'" not DEF nor CDEF in VDEF.'); } - this.vf = new RrdVdef(rpn.substring(index+1)); + this.vf = new RrdVdef(name, rpn.substring(index+1)); this.legend = ''; }; -- cgit v1.1