In Internet Explorer 8, NitrogenClass.prototype.$make_id()
triggers an error:
Object expected nitrogen.js, line 110 character 2
The reason is that the "matches" variable is null when match
doesn't match anything, and apply doesn't expect that. We can patch
this with:
diff --git a/apps/nitrogen/www/nitrogen.js b/apps/nitrogen/www/nitrogen.js
index 3c9e17d..b9a2c5e 100644
--- a/apps/nitrogen/www/nitrogen.js
+++ b/apps/nitrogen/www/nitrogen.js
@@ -107,7 +107,9 @@ NitrogenClass.prototype.$make_id = function(element) {
var re = new RegExp("\.wfid_(.[^\\s]*)", "g");
while(element && element.className) {
var matches = element.className.match(/wfid_([^\s])+/g);
- a.unshift.apply(a, matches);
+ if (matches) {
+ a.unshift.apply(a, matches);
+ }
element = element.parentNode;
}
As a matter of code hygiene, we can probably also remove the
"var re = ..." line, since it doesn't appear to be used.