diff --git a/lib/acl-checker.js b/lib/acl-checker.js index 577c0ef42..00a56aeae 100644 --- a/lib/acl-checker.js +++ b/lib/acl-checker.js @@ -28,7 +28,14 @@ class ACLChecker { constructor (resource, options = {}) { this.resource = resource this.resourceUrl = new URL(resource) - this.agentOrigin = options.strictOrigin && options.agentOrigin ? rdf.sym(options.agentOrigin) : null + this.agentOrigin = null + try { + if (options.strictOrigin && options.agentOrigin) { + this.agentOrigin = rdf.sym(options.agentOrigin) + } + } catch (e) { + // noop + } this.fetch = options.fetch this.fetchGraph = options.fetchGraph this.trustedOrigins = options.strictOrigin && options.trustedOrigins ? options.trustedOrigins.map(trustedOrigin => rdf.sym(trustedOrigin)) : null