Skip to content

Commit 0b810b0

Browse files
committed
Fix mistake left from previous release
1 parent c3f0d7c commit 0b810b0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/data.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ function getSyncedObject(data, schema, getRef) {
294294
for (let i = 0; i < keys.length; i++) {
295295
let key = keys[i];
296296
let schemaValue = schema_keys[key];
297-
298297
let isRef = schemaValue.hasOwnProperty('$ref');
299298

300299
if (isRef) {
@@ -497,7 +496,7 @@ export function findMatchingSubschemaIndex(data, schema, getRef, schemaName) {
497496
if (index === null) {
498497
// still no match found
499498
if (data === null) // for null data, return the first subschema and hope for the best
500-
index = 1;
499+
index = 0;
501500
else // for anything else, throw error
502501
throw new Error("No matching subschema found in '" + schemaName + "' for data '" + data + "' (type: " + dataType + ")");
503502
}

0 commit comments

Comments
 (0)