We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9d3858c + fc01e84 commit be63265Copy full SHA for be63265
1 file changed
packages/binding-http/src/http-client-impl.ts
@@ -158,7 +158,12 @@ export default class HttpClient implements ProtocolClient {
158
complete?: () => void
159
): Promise<Subscription> {
160
const defaultSubprotocol = "longpoll";
161
- const subprotocol = form.subprotocol ?? defaultSubprotocol;
+ let subprotocol = form.subprotocol;
162
+
163
+ if (subprotocol == null) {
164
+ warn(`Subscribing to ${form.href} using long polling for form without subprotocol`);
165
+ subprotocol = defaultSubprotocol;
166
+ }
167
168
let internalSubscription: InternalSubscription;
169
if (subprotocol === defaultSubprotocol) {
0 commit comments