lxieyang / chrome-extension-boilerplate-react

A Chrome Extensions boilerplate using React 18 and Webpack 5.
MIT License
3.47k stars 1.08k forks source link

Error compiling schema, function code: var refVal1 = refVal[1];var refVal2 = refVal[2]; var validate = #134

Open NaaeemMalik opened 2 years ago

NaaeemMalik commented 2 years ago

Hey guys I am getting this error

Error compiling schema, function code: var refVal1 = refVal[1];var refVal2 = refVal[2]; var validate = function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; var errors = 0; if (rootData === undefined) rootData = data; var errs_1 = errors; var errs_2 = errors; if ((typeof data !== "number" || (data % 1) || data !== data)) { var err = { keyword: 'type' , dataPath: (dataPath || '') + "" , schemaPath: '#/definitions/nonNegativeInteger/type' , params: { type: 'integer' } , message: 'should be integer' , schema: refVal[2].type , parentSchema: refVal[2] , data: data } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } if ((typeof data === "number")) { if ( data < 0 || data !== data) { var err = { keyword: 'minimum' , dataPath: (dataPath || '') + "" , schemaPath: '#/definitions/nonNegativeInteger/minimum' , params: { comparison: '>=', limit: 0, exclusive: false } , message: 'should be >= 0' , schema: 0 , parentSchema: refVal[2] , data: data } ; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } var valid2 = errors === errs_2; var valid1 = errors === errs_1; validate.errors = vErrors; return errors === 0; }; return validate;

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' https://ssl.google-analytics.com".

image