patches Test.AnotherWay._constructor_name to return an appropriate value using 'typeof' instead of an empty string when the constructor of a value could not be correctly determined using the current logic. This fixes many of the tests in Safari 3 and does not appear to affect FF2 or IE6 since the current logic is working for them.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5472 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Paul Spencer
2007-12-17 16:44:00 +00:00
parent 50ad4d4090
commit 5a11ac8ac6
2 changed files with 24 additions and 3 deletions

View File

@@ -379,8 +379,18 @@ Test.AnotherWay._constructor_name=function( x )
}else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) {
return RegExp.$1;
}else {
return "";
}
var c = '';
switch(typeof x) {
case 'string':
c = 'String';
break;
case 'object':
c = 'Object';
break;
default:
c = '';
}
return c; }
}
Test.AnotherWay._is_array=function( x )
{

View File

@@ -345,7 +345,18 @@ Test.AnotherWay._constructor_name=function( x )
}else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) {
return RegExp.$1;
}else {
return "";
var c = '';
switch(typeof x) {
case 'string':
c = 'String';
break;
case 'object':
c = 'Object';
break;
default:
c = '';
}
return c;
}
}
Test.AnotherWay._is_array=function( x )