Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
composerjs
composer-service-core
Commits
7744f4f7
Commit
7744f4f7
authored
Oct 22, 2020
by
Jean-Philippe Steinmetz
Browse files
Fixing issue that caused objects that could not be found to return as empty instances.
parent
c527b13a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/routes/ModelRoute.ts
View file @
7744f4f7
...
...
@@ -181,7 +181,7 @@ abstract class ModelRoute<T extends BaseEntity | SimpleEntity> {
}
// Make sure we return the correct data type
return
new
this
.
modelClass
(
existing
);
return
existing
?
new
this
.
modelClass
(
existing
)
:
undefined
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment