jsonld.js
jsonld.js copied to clipboard
Fix "Invalid calling object" in Edge and ES6 syntax error in IE
Included changes:
- Wrap indirect
setImmediate
into function to prevent "Invalid calling object" error in IE/Edge (due to a bug it's an error to callsetImmediate
indirectly). - Fix
babel-loader
include condition to transpilerdf-canonize
dependency.
This PR fixes issue #319
Hi @davidlehn @dlongley I rebased PR on latest develop to pass the tests. Is there anything else preventing the PR to be merged?
We encountered same issue and we end up importing from dist instead of primary entrypoint something like this:
const jsonld = require('jsonld/dist/jsonld.js');
Unfortunately, we still experience "Unhandled promise rejection TypeError: Invalid calling object"
and this fix would really help us as we do not want to start using babel loader for 3rd party libraries and node modules.