mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 03:03:25 +02:00
Use import
This commit is contained in:
parent
8512e3046a
commit
b93a9cdd8c
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const ReconnectingWebSocket = require('reconnecting-websocket');
|
import * as ReconnectingWebsocket from 'reconnecting-websocket';
|
||||||
import * as riot from 'riot';
|
import * as riot from 'riot';
|
||||||
import CONFIG from './config';
|
import CONFIG from './config';
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class Connection {
|
||||||
.join('&')
|
.join('&')
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
this.socket = new ReconnectingWebSocket(`${host}/${endpoint}${query ? '?' + query : ''}`);
|
this.socket = new ReconnectingWebsocket(`${host}/${endpoint}${query ? '?' + query : ''}`);
|
||||||
this.socket.addEventListener('open', this.onOpen);
|
this.socket.addEventListener('open', this.onOpen);
|
||||||
this.socket.addEventListener('close', this.onClose);
|
this.socket.addEventListener('close', this.onClose);
|
||||||
this.socket.addEventListener('message', this.onMessage);
|
this.socket.addEventListener('message', this.onMessage);
|
||||||
|
|
Loading…
Reference in a new issue