From 9513ad4f7088ad6490edc21c0c7351abf22026dd Mon Sep 17 00:00:00 2001 From: Jon Schlinkert Date: Mon, 18 Nov 2024 12:52:03 -0500 Subject: [PATCH] Fixed typos in error messages Signed-off-by: Jon Schlinkert --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f48edcf..307474a 100644 --- a/index.js +++ b/index.js @@ -230,7 +230,7 @@ class RefResolver { if (sourceSchema[key] !== undefined) { if (deepEqual(sourceSchema[key], targetSchema[key])) continue throw new Error( - `Cannot resolve ref "${ref.ref}". Property "${key}" is already exist in schema "${ref.sourceSchemaId}".` + `Cannot resolve ref "${ref.ref}". Property "${key}" already exists in schema "${ref.sourceSchemaId}".` ) } sourceSchema[key] = targetSchema[key] @@ -250,7 +250,7 @@ class RefResolver { #insertSchemaByAnchor (schema, schemaId, anchor) { const { anchors } = this.#schemas[schemaId] if (anchors[anchor] !== undefined) { - throw new Error(`There is already another anchor "${anchor}" in a schema "${schemaId}".`) + throw new Error(`There is already another anchor "${anchor}" in schema "${schemaId}".`) } anchors[anchor] = schema }