Skip to content

Commit 4751c45

Browse files
committed
updated label validator to also check for landmark names
1 parent 406686f commit 4751c45

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pages/Landmarks.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ function Landmarks() {
221221
if (labelLower.includes('landmark')) {
222222
hasLandmarkInLabel.push(key);
223223
}
224+
225+
// also check if it's a landmark type
226+
landmarksTypesArray.forEach((landmark) => {
227+
if (labelLower.includes(landmark)) {
228+
hasLandmarkInLabel.push(key);
229+
}
230+
});
224231
});
225232

226233
setHasLandmarkWord(hasLandmarkInLabel);
@@ -320,7 +327,7 @@ function Landmarks() {
320327
<Alert
321328
icon={<SvgWarning />}
322329
style={{ padding: 0 }}
323-
text={`Remove the word "landmark" as it is already included in the landmark type.`}
330+
text={`Remove the word "landmark" or the landmark type name, as it is already included in the landmark label.`}
324331
type="warning"
325332
/>
326333
<div className="spacer1" />

0 commit comments

Comments
 (0)