@whitesev/pops 2.0.12 → 2.0.13

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/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "弹窗库",
5
+ "$schema": "https://json.schemastore.org/package.json",
5
6
  "main": "dist/index.cjs.js",
6
7
  "module": "dist/index.esm.js",
7
8
  "types": "dist/types/index.d.ts",
@@ -539,11 +539,13 @@ export const PopsRightClickMenu = {
539
539
  clickEvent: MouseEvent | PointerEvent
540
540
  ) {
541
541
  if (typeof item.callback === "function") {
542
- OriginPrototype.Object.defineProperty(menuEvent, "target", {
543
- get() {
544
- return menuEventTarget;
545
- },
546
- });
542
+ try {
543
+ OriginPrototype.Object.defineProperty(menuEvent, "target", {
544
+ get() {
545
+ return menuEventTarget;
546
+ },
547
+ });
548
+ } catch (error) {}
547
549
  let callbackResult = await item.callback(
548
550
  clickEvent as PointerEvent,
549
551
  menuEvent,