Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 89f6860

Browse files
author
Francois-Xavier Gentilhomme
committed
[FIX] fixes ws url issue
1 parent caace55 commit 89f6860

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

dist/myscript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10561,7 +10561,7 @@ MyScript = {
1056110561
}
1056210562

1056310563
NetworkWSInterface.prototype.setUrl = function (url) {
10564-
if (url !== undefined) {
10564+
if ((url !== undefined) && (url !== this._url)) {
1056510565
this.close();
1056610566
this._url = url;
1056710567
}
@@ -11099,7 +11099,7 @@ MyScript = {
1109911099
* @param {String}
1110011100
*/
1110111101
AbstractWSRecognizer.prototype.setHost = function (host) {
11102-
if (host !== undefined) {
11102+
if ((host !== undefined) && (host != this.getHost())) {
1110311103
this.setUrl(this.getProtocol() + host);
1110411104
}
1110511105
};

dist/myscript.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/myscript.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/networking/networkWSInterface.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313

1414
NetworkWSInterface.prototype.setUrl = function (url) {
15-
if (url !== undefined) {
15+
if ((url !== undefined) && (url !== this._url)) {
1616
this.close();
1717
this._url = url;
1818
}

src/recognition/abstractWSRecognizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @param {String}
4444
*/
4545
AbstractWSRecognizer.prototype.setHost = function (host) {
46-
if (host !== undefined) {
46+
if ((host !== undefined) && (host != this.getHost())) {
4747
this.setUrl(this.getProtocol() + host);
4848
}
4949
};

0 commit comments

Comments
 (0)