Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit 34d23a6

Browse files
authored
Merge pull request #36 from datavisyn/asteiner/hasOnwerProperty
changes for hasOwnerProperty
2 parents 95beb90 + 9bd8161 commit 34d23a6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,13 @@ const ErrorBarsPlugin = {
206206
if (!cur) {
207207
return;
208208
}
209-
const hasLabelProperty = cur.hasOwnProperty(bar.label);
209+
const hasLabelProperty = Object.hasOwnProperty.call(cur, bar.label);
210210
let errorBarData = null;
211211

212212
// common scale such as categorical
213213
if (hasLabelProperty) {
214214
errorBarData = cur[bar.label];
215-
} else if (!hasLabelProperty && bar.label && bar.label.label && cur.hasOwnProperty(bar.label.label)) {
215+
} else if (!hasLabelProperty && bar.label && bar.label.label && Object.hasOwnProperty.call(cur, bar.label.label)) {
216216
// hierarchical scale has its label property nested in b.label object as b.label.label
217217
errorBarData = cur[bar.label.label];
218218
}

0 commit comments

Comments
 (0)