Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit c184825a
authored
May 05, 2015
by
Ruben Bridgewater
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a node-webkit issue
1 parent
b9a0339b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
lib/utils/parameter-validator.js
lib/utils/parameter-validator.js
View file @
c184825
...
...
@@ -8,7 +8,7 @@ var validateDeprecation = function(value, expectation, options) {
return
;
}
var
valid
=
value
instanceof
options
.
deprecated
;
var
valid
=
value
instanceof
options
.
deprecated
||
Object
.
prototype
.
toString
.
call
(
value
)
===
Object
.
prototype
.
toString
.
call
(
options
.
deprecated
.
call
())
;
if
(
valid
)
{
var
message
=
util
.
format
(
'%s should not be of type "%s"'
,
util
.
inspect
(
value
),
options
.
deprecated
.
name
);
...
...
@@ -20,7 +20,9 @@ var validateDeprecation = function(value, expectation, options) {
};
var
validate
=
function
(
value
,
expectation
)
{
if
(
value
instanceof
expectation
)
{
// the second part of this check is a workaround to deal with an issue that occurs in node-webkit when
// using object literals. https://github.com/sequelize/sequelize/issues/2685
if
(
value
instanceof
expectation
||
Object
.
prototype
.
toString
.
call
(
value
)
===
Object
.
prototype
.
toString
.
call
(
expectation
.
call
()))
{
return
true
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment