Skip to content

Commit 331f75b

Browse files
committed
[bugfix] 防止完全覆盖 AV 命名空间。
1 parent c7661dc commit 331f75b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/av-browser.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22

33
var AV = require('./AV');
44

5-
global.AV = AV;
5+
global.AV = global.AV || {};
6+
7+
// 防止多个 SDK 互相覆盖 AV 命名空间
8+
for (var k in AV) {
9+
global.AV[k] = AV[k];
10+
}

0 commit comments

Comments
 (0)