eslint fixes

This commit is contained in:
Cogent Apps
2023-03-09 11:50:57 -08:00
committed by GitHub
parent d9aa5aefbe
commit 7c5ffbbac7
13 changed files with 47 additions and 51 deletions

View File

@@ -11,7 +11,7 @@ export default class SSE {
public headers = this.options.headers || {};
public payload = this.options.payload !== undefined ? this.options.payload : '';
public method = this.options.method || (this.payload && 'POST' || 'GET');
public method = this.options.method ? this.options.method : (this.payload ? 'POST' : 'GET');
public withCredentials = !!this.options.withCredentials;
public FIELD_SEPARATOR = ':';
@@ -109,7 +109,7 @@ export default class SSE {
return;
}
if (this.readyState == this.CONNECTING) {
if (this.readyState === this.CONNECTING) {
this.dispatchEvent(new CustomEvent('open'));
this._setReadyState(this.OPEN);
}