foxbenjaminfox/vue-async-computed

Error when importing component which uses AsyncComputed

ChristophAnastasiades opened this issue · 1 comments

I created a component which uses vue-async-computed. However when importing that component into another Vue instance I get an error in vue-async-computed.js?0f91:47:

Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction

I am not sure whether this is an issue with vue-async-computed or not, apparently it might be an issue with Babel. However when importing and using vue-async-computed inside the new Vue instance it works fine. Any idea what could be the reason for that?

I doubt this error comes from vue-asyc-computed, because nowhere in vue-async-computed uses caller, callee, or arguments at all.

It might be that the async computed function which you're using is the one that's trying to do one of these things that are forbidden in strict mode, and the error is reported from the place where the library code calls you function, for some reason.

You could test that by temporarily removing the body of the async computed functions in your component, and seeing if the error still happens then. If it doesn't, that would imply that the content of one of those functions was the cause of this issue.