Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
d22c5af8
...
d22c5af8de68dd119abc9d1d480d309b12026767
authored
2013-09-11 00:36:19 +0200
by
Mickaël Andrieu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modified betterInstanceOf to make weak equality
1 parent
5eeaf0e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
modules/utils.js
modules/utils.js
View file @
d22c5af
...
...
@@ -80,14 +80,14 @@ exports.betterTypeOf = betterTypeOf;
*/
function
betterInstanceOf
(
input
,
constructor
)
{
"use strict"
;
while
(
input
!=
=
null
)
{
if
(
input
==
=
constructor
.
prototype
)
{
while
(
input
!=
null
)
{
if
(
input
==
constructor
.
prototype
)
{
return
true
;
}
if
(
typeof
input
==
=
'xml'
)
{
return
constructor
.
prototype
==
=
document
.
prototype
;
if
(
typeof
input
==
'xml'
)
{
return
constructor
.
prototype
==
document
.
prototype
;
}
if
(
typeof
input
==
=
'undefined'
)
{
if
(
typeof
input
==
'undefined'
)
{
return
false
;
}
input
=
input
.
__proto__
;
...
...
Please
register
or
sign in
to post a comment