Skip to content

Commit

Permalink
Update helpers.js (#1143)
Browse files Browse the repository at this point in the history
support typescript class constructor
  • Loading branch information
OniVe authored and johnleider committed Aug 3, 2017
1 parent 570b1b2 commit 15ddd89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/helpers.js
Expand Up @@ -93,7 +93,7 @@ export function getObjectValueByPath (obj, path) {
const a = path.split('.')
for (var i = 0, n = a.length; i < n; ++i) {
var k = a[i]
if (obj.constructor === Object && k in obj) {
if (obj instanceof Object && k in obj) {
obj = obj[k]
} else {
return
Expand Down

0 comments on commit 15ddd89

Please sign in to comment.