saasufy-components 1.5.1 → 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 +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/socket.js CHANGED
@@ -87,13 +87,15 @@ export class SocketProvider extends HTMLElement {
87
87
 
88
88
  getSocket() {
89
89
  if (this.saasufySocket) {
90
- if (this.saasufySocket.uri() !== this.getSanitizedURL()) {
90
+ let sanitizedURL = this.getSanitizedURL();
91
+ if (this.lastSaasufySocketURL !== sanitizedURL) {
91
92
  this.saasufySocket.connect(
92
93
  this.getSocketOptions()
93
94
  );
94
95
  } else {
95
96
  this.saasufySocket.connect();
96
97
  }
98
+ this.lastSaasufySocketURL = sanitizedURL;
97
99
  return this.saasufySocket;
98
100
  }
99
101
  return this.createSocket();
@@ -102,6 +104,7 @@ export class SocketProvider extends HTMLElement {
102
104
  createSocket() {
103
105
  let socketOptions = this.getSocketOptions();
104
106
  this.saasufySocket = create(socketOptions);
107
+ this.lastSaasufySocketURL = this.getSanitizedURL();
105
108
 
106
109
  return this.saasufySocket;
107
110
  }