TypeError while using strict mode
See original GitHub issueHi, I get this stacktrace sometimes (not sure why):
TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
Full stacktrace: http://hastebin.com/fuxulemeze.rb
I found a similar issue here that has been fixed: https://github.com/Automattic/mongoose/issues/3046
The fix seems to be to apply this same logic from this commit: https://github.com/Automattic/mongoose/commit/cdda75b998315f571523a9b947230044dfa11139 To the version.js file https://github.com/Automattic/mongoose/blob/master/lib/error/version.js
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Strict mode - JavaScript - MDN Web Docs
Strict mode forbids setting properties on primitive values. Accessing a property on a primitive implicitly creates a wrapper object that's ...
Read more >The cause for TypeError: access to strict mode caller function ...
What's happening is that code that tries to use the caller property of a function is being called by strict-mode code. Example:.
Read more >Solve JavaScript Error before it happens [strict mode] - Atatus
This is one of the most common errors in JavaScript. Strict mode makes it impossible to accidentally create global variables.
Read more >Using Strict Mode: Changes in strict mode | Saylor Academy
Without strict mode, setting properties is ignored (no-op), with strict mode, however, a TypeError is thrown. (function() { 'use strict'; false. true =...
Read more >Restricted in strict mode, js engine: hermes (React Native + ...
Describe the bug Getting an error with React Native when importing a ... which threw an exception: TypeError: Restricted in strict mode, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Woops looks like I didn’t read properly, good catch
@theqabalist opened a new issue ☝️ to track