Fixed schema names

This commit is contained in:
Alexander Cerutti
2019-06-15 23:57:18 +02:00
parent 734a9abc3b
commit f5cb43827e

View File

@@ -244,7 +244,7 @@ export class Pass implements PassIndexSignature {
} }
const validBeacons = data.reduce<schema.Beacon[]>((acc, current) => { const validBeacons = data.reduce<schema.Beacon[]>((acc, current) => {
if (!(Object.keys(current).length && schema.isValid(current, "locations"))) { if (!(Object.keys(current).length && schema.isValid(current, "beaconsDict"))) {
return acc; return acc;
} }
@@ -269,10 +269,10 @@ export class Pass implements PassIndexSignature {
locations(...data: schema.Location[]): this { locations(...data: schema.Location[]): this {
if (!data.length) { if (!data.length) {
return assignLength(0, this); return assignLength(0, this);
} }
const validLocations = data.reduce<schema.Location[]>((acc, current) => { const validLocations = data.reduce<schema.Location[]>((acc, current) => {
if (!(Object.keys(current).length && schema.isValid(current, "locations"))) { if (!(Object.keys(current).length && schema.isValid(current, "locationsDict"))) {
return acc; return acc;
} }
@@ -286,7 +286,7 @@ export class Pass implements PassIndexSignature {
this._props["locations"] = validLocations; this._props["locations"] = validLocations;
return assignLength(validLocations.length, this); return assignLength(validLocations.length, this);
} }
/** /**
* Sets current pass' relevancy through a date * Sets current pass' relevancy through a date