mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-08 17:00:47 +00:00
UBER-797: Fix popup menu runtime error (#3627)
Signed-off-by: Maxim Karmatskikh <mkarmatskih@gmail.com>
This commit is contained in:
parent
71b653dcac
commit
9396f7ef20
@ -214,6 +214,13 @@
|
||||
// I need to copypaste original function and make a little change
|
||||
// with showContextMenu falg
|
||||
shouldShow: ({ editor, view, state, oldState, from, to }) => {
|
||||
// For some reason shouldShow might be called after dismount and
|
||||
// after destroing the editor. We should handle this just no to have
|
||||
// any errors in runtime
|
||||
if (!element) {
|
||||
return false
|
||||
}
|
||||
|
||||
const { doc, selection } = state
|
||||
const { empty } = selection
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user