File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,9 @@ function knockSocket(location) {
39
39
if ( location . protocol !== 'https:' ) {
40
40
socketProtocol = 'ws' ;
41
41
}
42
- host = window . location . host ;
43
- url = `${ socketProtocol } ://${ host } /knock/socket/${ location } ` ;
44
- ws = new WebSocket ( url ) ;
42
+ let host = window . location . host ;
43
+ let url = `${ socketProtocol } ://${ host } /knock/socket/${ location } ` ;
44
+ const ws = new WebSocket ( url ) ;
45
45
46
46
ws . onopen = function ( ) {
47
47
console . log ( "Connected to websocket :)" )
@@ -55,7 +55,7 @@ function knockSocket(location) {
55
55
}
56
56
57
57
ws . onmessage = function ( msg ) {
58
- data = JSON . parse ( msg . data ) ;
58
+ let data = JSON . parse ( msg . data ) ;
59
59
console . log ( data )
60
60
if ( data . Event === "LOCATION" ) {
61
61
requestTitle . innerText = "Requesting Access at " + data . Location
You can’t perform that action at this time.
0 commit comments