Skip to content

Commit bd834f8

Browse files
author
shengyonggen
committed
Release 1.18.6
1 parent a1ff33e commit bd834f8

14 files changed

+77
-79
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 1.18.5 (2021-7-17)
1+
## 1.18.6 (2021-7-21)
2+
1. 修复
3+
- 修复 `A/B Testing SDK``SF-Web-SDK` 同时使用,`$pageview` 事件监听异常问题
4+
5+
## 1.18.5 (2021-7-17)
26
1. 修复
37
- 修复第三方工具压缩源码导致初始化异常问题
48

core/sensorsdata.amd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/sensorsdata.es6.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.

core/sensorsdata.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

heatmap.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.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sa-sdk-javascript",
3-
"version": "1.18.5",
3+
"version": "1.18.6",
44
"description": "official sensorsdata javascript sdk",
55
"main": "sensorsdata.min.js",
66
"scripts": {

product/heatmap.full.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9405,7 +9405,7 @@
94059405

94069406
window.sa_jssdk_heatmap_render = function(se, data, type, url) {
94079407
sd = se;
9408-
sd.heatmap_version = '1.18.5';
9408+
sd.heatmap_version = '1.18.6';
94099409
_ = sd._;
94109410

94119411
_.bindReady = function(fn, win) {

product/sensorsdata.amd.full.js

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2698,8 +2698,14 @@
26982698
}
26992699
val.callback.apply(val.context, args);
27002700
});
2701+
2702+
this.pendingEvents.push({
2703+
type: type,
2704+
data: args
2705+
});
2706+
this.pendingEvents.length > 20 ? this.pendingEvents.shift() : null;
27012707
},
2702-
on: function(event, callback, context) {
2708+
on: function(event, callback, context, replayAll) {
27032709
if (typeof callback !== 'function') {
27042710
return;
27052711
}
@@ -2708,31 +2714,23 @@
27082714
callback: callback,
27092715
context: context || this
27102716
});
2717+
2718+
var replayAll = replayAll === false ? false : true;
2719+
if (this.pendingEvents.length > 0 && replayAll) {
2720+
_.each(this.pendingEvents, function(val) {
2721+
if (val.type === event) {
2722+
callback.apply(context, val.data);
2723+
}
2724+
});
2725+
}
27112726
},
27122727
tempAdd: function(event, data) {
27132728
if (!data || !event) {
27142729
return;
27152730
}
2716-
2717-
this.pendingEvents.push({
2718-
type: event,
2719-
data: data
2720-
});
2721-
this.pendingEvents.length > 20 ? this.pendingEvents.shift() : null;
2731+
return this.emit(event, data);
27222732
},
2723-
isReady: function() {
2724-
var that = this;
2725-
this.tempAdd = this.emit;
2726-
2727-
if (this.pendingEvents.length === 0) {
2728-
return;
2729-
}
2730-
_.each(this.pendingEvents, function(val) {
2731-
that.emit(val.type, val.data);
2732-
});
2733-
2734-
this.pendingEvents = [];
2735-
}
2733+
isReady: function() {}
27362734
};
27372735

27382736
_.rot13obfs = function(str, key) {
@@ -3374,7 +3372,7 @@
33743372

33753373
sd.setInitVar = function() {
33763374
sd._t = sd._t || 1 * new Date();
3377-
sd.lib_version = '1.18.5';
3375+
sd.lib_version = '1.18.6';
33783376
sd.is_first_visitor = false;
33793377
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
33803378
};
@@ -4279,7 +4277,7 @@
42794277
source: 'sa-web-sdk',
42804278
type: 'v-is-vtrack',
42814279
data: {
4282-
sdkversion: '1.18.5'
4280+
sdkversion: '1.18.6'
42834281
}
42844282
},
42854283
'*'

product/sensorsdata.es6.full.js

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,8 +2692,14 @@ if (!String.prototype.replaceAll) {
26922692
}
26932693
val.callback.apply(val.context, args);
26942694
});
2695+
2696+
this.pendingEvents.push({
2697+
type: type,
2698+
data: args
2699+
});
2700+
this.pendingEvents.length > 20 ? this.pendingEvents.shift() : null;
26952701
},
2696-
on: function(event, callback, context) {
2702+
on: function(event, callback, context, replayAll) {
26972703
if (typeof callback !== 'function') {
26982704
return;
26992705
}
@@ -2702,31 +2708,23 @@ if (!String.prototype.replaceAll) {
27022708
callback: callback,
27032709
context: context || this
27042710
});
2711+
2712+
var replayAll = replayAll === false ? false : true;
2713+
if (this.pendingEvents.length > 0 && replayAll) {
2714+
_.each(this.pendingEvents, function(val) {
2715+
if (val.type === event) {
2716+
callback.apply(context, val.data);
2717+
}
2718+
});
2719+
}
27052720
},
27062721
tempAdd: function(event, data) {
27072722
if (!data || !event) {
27082723
return;
27092724
}
2710-
2711-
this.pendingEvents.push({
2712-
type: event,
2713-
data: data
2714-
});
2715-
this.pendingEvents.length > 20 ? this.pendingEvents.shift() : null;
2725+
return this.emit(event, data);
27162726
},
2717-
isReady: function() {
2718-
var that = this;
2719-
this.tempAdd = this.emit;
2720-
2721-
if (this.pendingEvents.length === 0) {
2722-
return;
2723-
}
2724-
_.each(this.pendingEvents, function(val) {
2725-
that.emit(val.type, val.data);
2726-
});
2727-
2728-
this.pendingEvents = [];
2729-
}
2727+
isReady: function() {}
27302728
};
27312729

27322730
_.rot13obfs = function(str, key) {
@@ -3368,7 +3366,7 @@ sd.setPreConfig = function(sa) {
33683366

33693367
sd.setInitVar = function() {
33703368
sd._t = sd._t || 1 * new Date();
3371-
sd.lib_version = '1.18.5';
3369+
sd.lib_version = '1.18.6';
33723370
sd.is_first_visitor = false;
33733371
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
33743372
};
@@ -4273,7 +4271,7 @@ sd.detectMode = function() {
42734271
source: 'sa-web-sdk',
42744272
type: 'v-is-vtrack',
42754273
data: {
4276-
sdkversion: '1.18.5'
4274+
sdkversion: '1.18.6'
42774275
}
42784276
},
42794277
'*'

product/sensorsdata.full.js

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,8 +2700,14 @@
27002700
}
27012701
val.callback.apply(val.context, args);
27022702
});
2703+
2704+
this.pendingEvents.push({
2705+
type: type,
2706+
data: args
2707+
});
2708+
this.pendingEvents.length > 20 ? this.pendingEvents.shift() : null;
27032709
},
2704-
on: function(event, callback, context) {
2710+
on: function(event, callback, context, replayAll) {
27052711
if (typeof callback !== 'function') {
27062712
return;
27072713
}
@@ -2710,31 +2716,23 @@
27102716
callback: callback,
27112717
context: context || this
27122718
});
2719+
2720+
var replayAll = replayAll === false ? false : true;
2721+
if (this.pendingEvents.length > 0 && replayAll) {
2722+
_.each(this.pendingEvents, function(val) {
2723+
if (val.type === event) {
2724+
callback.apply(context, val.data);
2725+
}
2726+
});
2727+
}
27132728
},
27142729
tempAdd: function(event, data) {
27152730
if (!data || !event) {
27162731
return;
27172732
}
2718-
2719-
this.pendingEvents.push({
2720-
type: event,
2721-
data: data
2722-
});
2723-
this.pendingEvents.length > 20 ? this.pendingEvents.shift() : null;
2733+
return this.emit(event, data);
27242734
},
2725-
isReady: function() {
2726-
var that = this;
2727-
this.tempAdd = this.emit;
2728-
2729-
if (this.pendingEvents.length === 0) {
2730-
return;
2731-
}
2732-
_.each(this.pendingEvents, function(val) {
2733-
that.emit(val.type, val.data);
2734-
});
2735-
2736-
this.pendingEvents = [];
2737-
}
2735+
isReady: function() {}
27382736
};
27392737

27402738
_.rot13obfs = function(str, key) {
@@ -3376,7 +3374,7 @@
33763374

33773375
sd.setInitVar = function() {
33783376
sd._t = sd._t || 1 * new Date();
3379-
sd.lib_version = '1.18.5';
3377+
sd.lib_version = '1.18.6';
33803378
sd.is_first_visitor = false;
33813379
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
33823380
};
@@ -4281,7 +4279,7 @@
42814279
source: 'sa-web-sdk',
42824280
type: 'v-is-vtrack',
42834281
data: {
4284-
sdkversion: '1.18.5'
4282+
sdkversion: '1.18.6'
42854283
}
42864284
},
42874285
'*'

0 commit comments

Comments
 (0)