Skip to content

Commit 2518291

Browse files
authored
Merge pull request #18 from excid3/fix-render-turbo-stream
Fix renderTurboStream return
2 parents d155443 + 8144cc3 commit 2518291

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fetch_response.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export class FetchResponse {
6060
} else {
6161
console.warn('You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js')
6262
}
63+
} else {
64+
return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`))
6365
}
64-
65-
return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`))
6666
}
6767
}

0 commit comments

Comments
 (0)