Skip to content

Commit a424aba

Browse files
authored
Merge pull request #12 from n8tz/dev
Dev
2 parents a816b23 + d49cb0a commit a424aba

File tree

7 files changed

+20602
-22715
lines changed

7 files changed

+20602
-22715
lines changed

dist.samples/Samples.js

Lines changed: 20593 additions & 22706 deletions
Large diffs are not rendered by default.

dist.samples/Samples.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist.samples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- ~ The MIT License (MIT) ~ Copyright (c) 2019. Wise Wild Web ~ ~ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: ~ ~ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ~ ~ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ~ ~ @author : Nathanael Braun ~ @contact : n8tz.js@gmail.com --><!DOCTYPE html><html><head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/></head><body><script type="text/javascript" src="Samples.js"></script></body></html>
1+
<!-- ~ The MIT License (MIT) ~ Copyright (c) 2019. Wise Wild Web ~ ~ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: ~ ~ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ~ ~ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ~ ~ @author : Nathanael Braun ~ @contact : n8tz.js@gmail.com --><!DOCTYPE html><html><head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/></head><body><script src="Samples.js"></script></body></html>

dist/ContextMenu.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ContextMenu.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-inheritable-contextmenu",
3-
"version": "1.5.3",
3+
"version": "1.5.4",
44
"description": "Simple Context menu component for react showing all inherited parents menu with SSR compatibility.",
55
"license": "MIT",
66
"author": "Nathan Braun <n8tz.js@gmail.com>",
@@ -21,11 +21,12 @@
2121
"react-dom": "^16.3.2"
2222
},
2323
"dependencies": {
24+
"@babel/runtime": "^7.12.5",
2425
"classlist-polyfill": "^1.2.0",
2526
"is": "^3.2.1"
2627
},
2728
"devDependencies": {
28-
"layer-pack": "^1.0.0",
29-
"lpack-react": "^1.0.0"
29+
"layer-pack": "^1.1.1",
30+
"lpack-react": "^1.3.3"
3031
}
3132
}

src/utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ export function findAllMenuFrom( element ) {
5151
export function findReactComponent( element ) {
5252
let fiberNode;
5353
for ( const key in element ) {
54-
if ( key.startsWith('__reactInternalInstance$') ) {
54+
if ( key.startsWith('__reactInternalInstance$') || key.startsWith('__reactFiber$') ) {
5555
fiberNode = element[key];
56-
5756
return fiberNode && fiberNode.return && fiberNode.return.stateNode;
5857
}
5958
}

0 commit comments

Comments
 (0)