diff options
author | Igor Sfiligoi <isfiligoi@ucsd.edu> | 2013-11-01 18:51:58 +0000 |
---|---|---|
committer | Igor Sfiligoi <isfiligoi@ucsd.edu> | 2013-11-01 18:51:58 +0000 |
commit | f0a32ea520eff26cdabf6f9ff09c591d514a559b (patch) | |
tree | 5b33e94d6b85b879fff259b4e25997209d7ae71a /src/lib | |
parent | 2fba2d06fc5b65b1948716832664197dc9a27134 (diff) |
Change logic to propery distinguish an array from a generic object
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/rrdFlot.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/rrdFlot.js b/src/lib/rrdFlot.js index 8621234..668f112 100644 --- a/src/lib/rrdFlot.js +++ b/src/lib/rrdFlot.js @@ -640,14 +640,14 @@ function resetWindow() { function populateGraphOptions(me, other) {
for (e in other) {
if (me[e]!=undefined) {
- if (typeof(other[e])=="object") {
+ if (Object.prototype.toString.call(other[e])=="[object Object]") {
me[e]=populateGraphOptions(me[e],other[e]);
} else {
me[e]=other[e];
}
} else {
/// create a new one
- if (typeof(other[e])=="object") {
+ if (Object.prototype.toString.call(other[e])=="[object Object]") {
// This will do a deep copy
me[e]=populateGraphOptions({},other[e]);
} else {
|