Skip to content

Commit 46efa84

Browse files
authored
Merge pull request #140 from chornos13/master
fix: bug length undefined when not passing include in generate function
2 parents 0e5492f + b93342a commit 46efa84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/SqlizeQuery/PluginSqlizeQuery.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function filterIncludeHandledOnly({
184184

185185
function injectRequireInclude(include: Includeable[]) {
186186
function test(dataInclude: Includeable[]) {
187-
for (let i = 0; i < dataInclude.length; i += 1) {
187+
for (let i = 0; i < (dataInclude?.length || 0); i += 1) {
188188
const optionInclude = dataInclude[i] as IncludeOptions
189189
let data
190190
if (optionInclude.include) {

0 commit comments

Comments
 (0)