You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
V1.25.0 In IE is fine, but Since V1.26.0, IE can't work, the problem is this line : element.className = element.className.replace(RegExp(lang, 'gi'), '');
Example
Because the type of lang is RexExp, but in IE, RegExp() function, the first parame only can be a String, so it cant't run.
Maybe We can do this to solve it : element.className = element.className.replace(RegExp(String(lang), 'gi'), '');
In addition, the modifier of lang is 'i' : var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;,
but here it is changed to 'gi', I am really worried about whether it will cause an error in some case.
The text was updated successfully, but these errors were encountered:
RegExp.prototype.source will return the RegExp text part, no include flags, so is : element.className = element.className.replace(RegExp(lang.source, 'gi'), '');
Information:
Description
V1.25.0 In IE is fine, but Since V1.26.0, IE can't work, the problem is this line :
element.className = element.className.replace(RegExp(lang, 'gi'), '');
Example
Because the type of
lang
is RexExp, but in IE,RegExp()
function, the first parame only can be a String, so it cant't run.Maybe We can do this to solve it :
element.className = element.className.replace(RegExp(String(lang), 'gi'), '');
In addition, the modifier of
lang
is 'i' :var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
,but here it is changed to 'gi', I am really worried about whether it will cause an error in some case.
The text was updated successfully, but these errors were encountered: