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 3a141ac8
authored
Oct 16, 2019
by
Pedro Luiz Cabral Salomon Prado
Committed by
Sushant
Oct 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(model): remove useless conditional (#11557)
1 parent
c2472bb9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
lib/model.js
lib/model.js
View file @
3a141ac
...
@@ -3776,11 +3776,7 @@ class Model {
...
@@ -3776,11 +3776,7 @@ class Model {
const
association
=
include
.
association
;
const
association
=
include
.
association
;
const
accessor
=
key
;
const
accessor
=
key
;
const
primaryKeyAttribute
=
include
.
model
.
primaryKeyAttribute
;
const
primaryKeyAttribute
=
include
.
model
.
primaryKeyAttribute
;
let
childOptions
;
const
childOptions
=
{
let
isEmpty
;
if
(
!
isEmpty
)
{
childOptions
=
{
isNewRecord
:
this
.
isNewRecord
,
isNewRecord
:
this
.
isNewRecord
,
include
:
include
.
include
,
include
:
include
.
include
,
includeNames
:
include
.
includeNames
,
includeNames
:
include
.
includeNames
,
...
@@ -3789,7 +3785,8 @@ class Model {
...
@@ -3789,7 +3785,8 @@ class Model {
raw
:
options
.
raw
,
raw
:
options
.
raw
,
attributes
:
include
.
originalAttributes
attributes
:
include
.
originalAttributes
};
};
}
let
isEmpty
;
if
(
include
.
originalAttributes
===
undefined
||
include
.
originalAttributes
.
length
)
{
if
(
include
.
originalAttributes
===
undefined
||
include
.
originalAttributes
.
length
)
{
if
(
association
.
isSingleAssociation
)
{
if
(
association
.
isSingleAssociation
)
{
if
(
Array
.
isArray
(
value
))
{
if
(
Array
.
isArray
(
value
))
{
...
...
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