dazscript-framework 1.0.17 → 1.0.18

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,6 +1,6 @@
1
1
  {
2
2
  "name": "dazscript-framework",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "author": "Freddy Diaz",
5
5
  "license": "MPL-2.0",
6
6
  "description": "",
@@ -461,9 +461,11 @@ const build = <TItem, TData>(context: ListViewBuilderContext<TItem, TData>): DzL
461
461
  })
462
462
  }
463
463
 
464
- listView.contextMenuRequested.scriptConnect((item: DzListViewItem, pos: Point) => {
465
- context.contextMenu?.(listView, item, pos).exec(pos.cursorPos(), 0)
466
- })
464
+ if (context.contextMenu) {
465
+ listView.contextMenuRequested.scriptConnect((item: DzListViewItem, pos: Point) => {
466
+ context.contextMenu(listView, item, pos).exec(pos.cursorPos(), 0)
467
+ })
468
+ }
467
469
 
468
470
  return listView
469
471
  }