moddle
Advanced tools
Comparing version 7.0.0-exp.0 to 7.0.0-exp.1
@@ -755,11 +755,16 @@ import { forEach, bind, pick, assign, isString, isObject } from 'min-dash'; | ||
const strict = model.config.strict === true; | ||
const strict = model.config.strict; | ||
if (strict) { | ||
throw new TypeError(`unknown property <${ name }> on <${ target.$type }>`); | ||
if (typeof strict !== 'undefined') { | ||
const error = new TypeError(`unknown property <${ name }> on <${ target.$type }>`); | ||
if (strict) { | ||
throw error; | ||
} else { | ||
// eslint-disable-next-line no-undef | ||
typeof console !== 'undefined' && console.warn(error); | ||
} | ||
} | ||
// eslint-disable-next-line no-undef | ||
typeof console !== 'undefined' && console.warn(`unknown property <${ name }> on <${ target.$type }>`); | ||
return null; | ||
@@ -766,0 +771,0 @@ }; |
{ | ||
"name": "moddle", | ||
"version": "7.0.0-exp.0", | ||
"version": "7.0.0-exp.1", | ||
"description": "A library for importing meta-model based file formats into JS", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
274694
4084