New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid operand to 'in': Object expected #912

krnjn opened this Issue Aug 2, 2017 · 4 comments


None yet
2 participants

krnjn commented Aug 2, 2017

It seems like this change made in v3.15.0 broke some functionality on IE 10 and lower. Downgrading to v3.14.2 resolved the issue.

This may have something to do with the caveat listed on Babel about the use of __proto__ on IE 10 and below:

If you’re inheriting from a class then static properties are inherited from it via proto, this is widely supported but you may run into problems with much older browsers. NOTE: proto is not supported on IE <= 10 so static properties will not be inherited. See the protoToAssign for a possible work around. For classes that have supers, the super class won’t resolve correctly. You can get around this by enabling the loose option in the es2015-classes plugin.

The specific error we received (in the title) and full stack trace we received via Honeybadger is available here:

Invalid operand to 'in': Object expected
 customs.js  100  0  unknown(...)
webpack:///./node_modules/mathjs/lib/utils/customs.js:100:0:in `unknown'
 98  */
 99 function isSafeMethod (object, method) {
100   if (!object || typeof object[method] !== 'function') {
101     return false;
102   }
 OperatorNode.js  77  0  unknown(...)
webpack:///./node_modules/mathjs/lib/expression/node/OperatorNode.js:77:0:in `unknown'
 compile.js  43  0  unknown(...)
webpack:///./node_modules/mathjs/lib/expression/node/compile.js:43:0:in `unknown'
 Node.js  57  0  code(...)
webpack:///./node_modules/mathjs/lib/expression/node/Node.js:57:0:in `code'
 eval.js  47  0  unknown(...)
webpack:///./node_modules/mathjs/lib/expression/function/eval.js:47:0:in `unknown'
 calculator.js  56  6  result(...)
webpack:///./app/javascript/src/form_filler/calculator.js:56:6:in `result'
 calculator.js  33  10  result(...)
webpack:///./app/javascript/src/form_filler/calculator.js:33:10:in `result'
 calculator.js  26  8  unknown(...)
webpack:///./app/javascript/src/form_filler/calculator.js:26:8:in `unknown'
 calculator.js  28  6  unknown(...)
webpack:///./app/javascript/src/form_filler/calculator.js:28:6:in `unknown'

@josdejong josdejong added the bug label Aug 4, 2017


This comment has been minimized.


josdejong commented Aug 4, 2017

Thanks for reporting, we'll fix this issue asap.

@josdejong josdejong closed this in 05e8009 Aug 6, 2017


This comment has been minimized.


josdejong commented Aug 6, 2017

This issue is fixed now in v3.16.0


This comment has been minimized.

krnjn commented Aug 7, 2017

Thanks for the quick fix @josdejong!


This comment has been minimized.


josdejong commented Aug 8, 2017

you're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment