tdegrunt / jsonschema

JSON Schema validation
Other
1.82k stars 262 forks source link

Validation errors in firefox not constructing properly #378

Closed joe-hilling closed 1 year ago

joe-hilling commented 1 year ago

In helpers.js

/**
 * Describes a problem with a Schema which prevents validation of an instance
 * @name SchemaError
 * @constructor
 */
var SchemaError = exports.SchemaError = function SchemaError (msg, schema) {
  this.message = msg;
  this.schema = schema;
  Error.call(this, msg);
  Error.captureStackTrace(this, SchemaError); 
};

Error.captureStackTrace is not available in Firefox.

awwright commented 1 year ago

Browsers aren't formally supported, but this is an easy enough fix, fixed in 8211fff