qb-pc-sdk 1.0.4 → 1.0.5

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.
package/index.js CHANGED
@@ -74,7 +74,8 @@ if (isBrowser && typeof window !== 'undefined' && window.console && !window.cons
74
74
  // 拦截未捕获的 Promise rejection
75
75
  const originalUnhandledRejection = window.onunhandledrejection;
76
76
  window.addEventListener('unhandledrejection', function(event) {
77
- const errorText = (event.reason?.message || event.reason || '').toString().toLowerCase();
77
+ const reason = event.reason || {};
78
+ const errorText = (reason.message || reason || '').toString().toLowerCase();
78
79
  if (shouldFilter(errorText)) {
79
80
  // 阻止默认行为,静默处理
80
81
  event.preventDefault();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qb-pc-sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "趣变广告 SDK 封装器 - PC端广告接入工具,自动处理多级接口映射与原生渲染逻辑",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -76,7 +76,8 @@
76
76
  // 拦截未捕获的 Promise rejection
77
77
  const originalUnhandledRejection = window.onunhandledrejection;
78
78
  window.addEventListener('unhandledrejection', function(event) {
79
- const errorText = (event.reason?.message || event.reason || '').toString().toLowerCase();
79
+ const reason = event.reason || {};
80
+ const errorText = (reason.message || reason || '').toString().toLowerCase();
80
81
  if (shouldFilter(errorText)) {
81
82
  // 阻止默认行为,静默处理
82
83
  event.preventDefault();