flexie icon indicating copy to clipboard operation
flexie copied to clipboard

"Fix crash if not used box-flex attribute" Resurfaced

Open tcannonfodder opened this issue 13 years ago • 1 comments

It looks like this error has resurfaced (albeit in a different location): https://github.com/doctyper/flexie/pull/12

I've ran into the exact situation presented in the Pull Request (if there's an element in the style sheet with a box-flex definition that is not present in HTML code, flexie throws the error). This time, it seems to be at line 143 of the de-obfuscated code (or line 5 of the minimized code).

Has anyone else run into this issue?

Code:

function da(a, d, c) {
        var b, e, f = [];
        h(c, function(g, i) {
/* !![Chrome's Inspect Element Script Debugger Inserted this message]!!
      flexie.min.js:5Uncaught TypeError: Cannot call method 'toLowerCase' of undefined */
            if (i.selector) {
                b = d(i.selector);
                b = b[0] ? b : [ b ];
                b[0] && h(b, function(j, l) {
                    switch (l.nodeName.toLowerCase()) {
                      case "script":
                      case "style":
                      case "link":
                        break;
                      default:
                        if (l.parentNode === a) {
                            S(l);
                            e = {};
                            h(i, function(m) {
                                e[m] = i[m];
                            });
                            e.match = l;
                            f.push(e);
                        }
                    }
                });
            } else {
                S(i);
                f.push({
                    match: i,
                    selector: $(i)
                });
            }
        });
        return f;
    }

tcannonfodder avatar Jun 26 '11 19:06 tcannonfodder

I've made another attempt at suppressing the error. Can you confirm that it's working?

doctyper avatar Aug 15 '11 23:08 doctyper