Keep in mind that the code has to compile for checks to work. Eg a ‘let’ in the same script block will break the isIE check too and it’s easy to miss that someone broke it. How often does the ie11 code get tested on ie11..
Best to keep the IE 11 warning code in a separate (nomodule?) script file