From fdc5e1f489a306104c9a7fac384adf52ef7a084c Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Mon, 15 Jul 2024 15:44:44 -0600 Subject: [PATCH] add duplicate check to QSM.addWarning(), https://github.com/phetsims/joist/issues/970 Signed-off-by: Michael Kauzmann --- js/initialize-globals.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/initialize-globals.js b/js/initialize-globals.js index 4330ae547..787c8e030 100644 --- a/js/initialize-globals.js +++ b/js/initialize-globals.js @@ -1098,6 +1098,7 @@ assert && assert( false, 'invalid locale:', inputValueLocale ); } else { + // This may occur twice in unbuilt mode when done loading unbuilt strings and when running this file. QueryStringMachine.addWarning( 'locale', inputValueLocale, `Invalid locale format received: ${badLocale}. ?locale query parameter accepts the following formats: "xx" for ISO-639-1, "xx_XX" for ISO-639-1 and a 2-letter country code, "xxx" for ISO-639-2` ); } }