Skip to content

Commit 8f5b4e8

Browse files
authored
heatmap fix (lint) (#197)
1 parent d1f65f2 commit 8f5b4e8

File tree

5 files changed

+57
-54
lines changed

5 files changed

+57
-54
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 22.02.1
2+
- Fixed a bug where heatmap files were not loading
3+
14
## 22.02.0
25
- !! Major breaking change !! Device ID provided during the init will be ignored if a device ID was provided previously
36
- Added a new init time flag which erases the previously stored device ID. This allows to set new device ID during init

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ or
3030

3131
Countly web SDK is available on CDNJS. Use either
3232

33-
[https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.02.0/countly.min.js](https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.02.0/countly.min.js)
33+
[https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.02.1/countly.min.js](https://cdnjs.cloudflare.com/ajax/libs/countly-sdk-web/22.02.1/countly.min.js)
3434

3535
or
3636

lib/countly.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
*/
158158
Countly.onload = Countly.onload || [];
159159

160-
var SDK_VERSION = "22.02.0";
160+
var SDK_VERSION = "22.02.1";
161161
var SDK_NAME = "javascript_native_web";
162162

163163
var urlParseRE = /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/;
@@ -4258,15 +4258,15 @@
42584258
var loaded;
42594259
fileRef.setAttribute(attr, type);
42604260
fileRef.setAttribute(src, data);
4261+
var callbackFunction = function() {
4262+
if (!loaded) {
4263+
callback();
4264+
}
4265+
loaded = true;
4266+
};
42614267
if (callback) {
4262-
fileRef.onreadystatechange = function() {
4263-
fileRef.onload = function() {
4264-
if (!loaded) {
4265-
callback();
4266-
}
4267-
loaded = true;
4268-
};
4269-
};
4268+
fileRef.onreadystatechange = callbackFunction();
4269+
fileRef.onload = callbackFunction();
42704270
}
42714271
document.getElementsByTagName("head")[0].appendChild(fileRef);
42724272
}

0 commit comments

Comments
 (0)