Skip to content

Commit 8144cc3

Browse files
committed
Fix renderTurboStream return
1 parent d155443 commit 8144cc3

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)