Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unable to get value of the property 'split': object is null or undefined #376

Open
GoogleCodeExporter opened this issue Nov 17, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hi. Due to confidentially agreements I've signed, I cannot point you to a page 
that shows the problem, nor am I even sure how to reproduce the problem.

I suspect it may happen on all systems using:

http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js

I could view the error by using IE9 with the developer tools and setting the 
mode to IE7 browser standards/IE7 document standards and then running the 
script debugger. I could also view it with IE9 set to compatibility mode.

The problem seems pretty simple: the following code tries to call split() on an 
undefined value.

// =========================================================================
// ie8-layout.js
// =========================================================================

if (appVersion < 8) {
  IE7.CSS.addRecalc("border-spacing", NUMERIC, function(element) {
    if (element.currentStyle.borderCollapse !== "collapse") {
    element.cellSpacing = getPixelValue(element, element.currentStyle["ie7-border-spacing"].split(" ")[0]);
    }
  });

This looks like a reasonable fix:

// =========================================================================
// ie8-layout.js
// =========================================================================

if (appVersion < 8) {
  IE7.CSS.addRecalc("border-spacing", NUMERIC, function(element) {
    if (element.currentStyle.borderCollapse !== "collapse") {
    element.cellSpacing = getPixelValue(element, getDefinedStyle(element, 'border-spacing').split(" ")[0]);
    }
  });

I don't know if this causes a different problem, but my page now runs without 
error. In any case, it is clear that there are conditions under which 
"ie7-border-style" is not defined. The code needs to guard against this somehow.


Original issue reported on code.google.com by [email protected] on 30 Aug 2012 at 10:18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant