-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
It seems that running Asciidoctor.js does pollute Javascript native object prototypes that leads to weird bugs. For example, this code adds a stub $id
method to Array
prototype so all arrays suddenly get it:
import asciidoctor from "@asciidoctor/core";
asciidoctor();
console.log([].$id);
// [Function: method_missing_stub] { '$$stub': true }
console.log(Array.prototype.$id);
// [Function: method_missing_stub] { '$$stub': true }
I discover a bug with this in ajv
schema validator that runs into issues when it encounters an array of schemas with a present $id
property, which it only expects to find on a single schema, not array.
Metadata
Metadata
Assignees
Labels
No labels