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:
+12
-2
@@ -379,8 +379,18 @@ Test.AnotherWay._constructor_name=function( x )
|
|||||||
}else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) {
|
}else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) {
|
||||||
return RegExp.$1;
|
return RegExp.$1;
|
||||||
}else {
|
}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 )
|
Test.AnotherWay._is_array=function( x )
|
||||||
{
|
{
|
||||||
|
|||||||
+12
-1
@@ -345,7 +345,18 @@ Test.AnotherWay._constructor_name=function( x )
|
|||||||
}else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) {
|
}else if( s.match( /^\s*function\s+(\w+)\s*\(/ ) ) {
|
||||||
return RegExp.$1;
|
return RegExp.$1;
|
||||||
}else {
|
}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 )
|
Test.AnotherWay._is_array=function( x )
|
||||||
|
|||||||
Reference in New Issue
Block a user