saasufy-components 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/socket.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/socket.js CHANGED
@@ -88,13 +88,14 @@ export class SocketProvider extends HTMLElement {
88
88
  getSocket() {
89
89
  if (this.saasufySocket) {
90
90
  let sanitizedURL = this.getSanitizedURL();
91
- if (sanitizedURL && this.saasufySocket.uri() !== sanitizedURL) {
91
+ if (this.lastSaasufySocketURL !== sanitizedURL) {
92
92
  this.saasufySocket.connect(
93
93
  this.getSocketOptions()
94
94
  );
95
95
  } else {
96
96
  this.saasufySocket.connect();
97
97
  }
98
+ this.lastSaasufySocketURL = sanitizedURL;
98
99
  return this.saasufySocket;
99
100
  }
100
101
  return this.createSocket();
@@ -103,6 +104,7 @@ export class SocketProvider extends HTMLElement {
103
104
  createSocket() {
104
105
  let socketOptions = this.getSocketOptions();
105
106
  this.saasufySocket = create(socketOptions);
107
+ this.lastSaasufySocketURL = this.getSanitizedURL();
106
108
 
107
109
  return this.saasufySocket;
108
110
  }