File tree Expand file tree Collapse file tree 5 files changed +3
-6
lines changed Expand file tree Collapse file tree 5 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ function Popup({ data, name }) {
13
13
const { position = { } , visible = false } = data . modal || { } ;
14
14
const { children, options } = data . popup || { } ;
15
15
16
- console . log ( options . theme , defaultSettings . theme ) ;
17
-
18
16
useEffect ( ( ) => {
19
17
if ( popup . current ) {
20
18
updateStorage ( name , {
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ function Child({ child, data = {} }) {
100
100
const toggleHandle = ( e ) => {
101
101
const object = getStorage ( name ) ;
102
102
if ( object ?. modal ?. enabled || object ?. modal ?. visible ) {
103
- if ( toggle && ( ( e ?. button === 0 && capture === "click" ) || ( e ?. button === 2 && capture === "contextmenu" ) ) ) ( toggled = true ) ;
103
+ if ( ( toggle ?? defaultSettings . toggle ) && ( ( e ?. button === 0 && capture === "click" ) || ( e ?. button === 2 && capture === "contextmenu" ) ) ) ( toggled = true ) ;
104
104
closePopup ( name , object ) ;
105
105
}
106
106
} ;
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ function Popup(_ref) {
39
39
var _ref3 = data . popup || { } ,
40
40
children = _ref3 . children ,
41
41
options = _ref3 . options ;
42
- console . log ( options . theme , defaultSettings . theme ) ;
43
42
( 0 , _react . useEffect ) ( function ( ) {
44
43
if ( popup . current ) {
45
44
updateStorage ( name , {
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ function Child(_ref2) {
102
102
var _object$modal , _object$modal2 ;
103
103
var object = getStorage ( name ) ;
104
104
if ( object !== null && object !== void 0 && ( _object$modal = object . modal ) !== null && _object$modal !== void 0 && _object$modal . enabled || object !== null && object !== void 0 && ( _object$modal2 = object . modal ) !== null && _object$modal2 !== void 0 && _object$modal2 . visible ) {
105
- if ( toggle && ( ( e === null || e === void 0 ? void 0 : e . button ) === 0 && capture === "click" || ( e === null || e === void 0 ? void 0 : e . button ) === 2 && capture === "contextmenu" ) ) toggled = true ;
105
+ if ( ( toggle !== null && toggle !== void 0 ? toggle : defaultSettings . toggle ) && ( ( e === null || e === void 0 ? void 0 : e . button ) === 0 && capture === "click" || ( e === null || e === void 0 ? void 0 : e . button ) === 2 && capture === "contextmenu" ) ) toggled = true ;
106
106
closePopup ( name , object ) ;
107
107
}
108
108
} ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " oasismenu" ,
3
- "version" : " 1.3.0 " ,
3
+ "version" : " 1.3.1 " ,
4
4
"description" : " OasisMenu is a lightweight and customizable context menu implementation for React." ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments