@ronin/compiler 0.18.3-invalid-json-experimental-442 → 0.18.4-invalid-json-experimental-443
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1374,7 +1374,7 @@ var composeConditions = (models, model, statementParams, instructionName, value,
|
|
1374
1374
|
const fieldIsJSON = (modelField?.type === "json" || modelField?.type === "blob") && instructionName === "to";
|
1375
1375
|
const valueIsJSON = isObject(value) || (modelField?.type === "blob" ? null : Array.isArray(value));
|
1376
1376
|
if (!valueIsJSON || getQuerySymbol(value) || fieldIsJSON) {
|
1377
|
-
if (modelField && fieldIsJSON && !valueIsJSON) {
|
1377
|
+
if (modelField && fieldIsJSON && !valueIsJSON && value !== null) {
|
1378
1378
|
const messagePrefix = "The provided field value is not";
|
1379
1379
|
const message = modelField.type === "json" ? `${messagePrefix} valid JSON. Only objects and arrays should be provided. Other types of values should be stored in their respective primitive field types.` : `${messagePrefix} a valid Blob reference.`;
|
1380
1380
|
throw new RoninError({
|
package/package.json
CHANGED