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
In prototypejs 1.5 we were verifying for null value which we are not doing in 1.7
Current 1.7 version has the following
hasClassName: function(element, className) {
if (!(element = $(element))) return;
var elementClassName = element.className;
return (elementClassName.length > 0 && (elementClassName == className ||
new RegExp("(^|\s)" + className + "(\s|$)").test(elementClassName)));
},
In 1.5 we were having the following
hasClassName: function(element, className) {
if (!(element = $(element))) return;
var elementClassName = element.className;
if (elementClassName == null || elementClassName.length == 0) return false;
if (elementClassName == className ||
elementClassName.match(new RegExp("(^|\s)" + className + "(\s|$)")))
return true;
return false;
},
Because of this issue one of my existing feature was breaking. I solved the issue by adding
if(typeof elementClassName === "undefined") return false;
to 1.7 version
Let me know if this is intended or can be considered as bug
The text was updated successfully, but these errors were encountered:
In prototypejs 1.5 we were verifying for null value which we are not doing in 1.7
Current 1.7 version has the following
hasClassName: function(element, className) {
if (!(element = $(element))) return;
var elementClassName = element.className;
return (elementClassName.length > 0 && (elementClassName == className ||
new RegExp("(^|\s)" + className + "(\s|$)").test(elementClassName)));
},
In 1.5 we were having the following
hasClassName: function(element, className) {
if (!(element = $(element))) return;
var elementClassName = element.className;
if (elementClassName == null || elementClassName.length == 0) return false;
if (elementClassName == className ||
elementClassName.match(new RegExp("(^|\s)" + className + "(\s|$)")))
return true;
return false;
},
Because of this issue one of my existing feature was breaking. I solved the issue by adding
if(typeof elementClassName === "undefined") return false;
to 1.7 version
Let me know if this is intended or can be considered as bug
The text was updated successfully, but these errors were encountered: