chore: handle function not set (preserve non-breaking)
This commit is contained in:
parent
141e1cf648
commit
298da03e2f
@ -74,7 +74,9 @@ class ToolbarRow extends Component {
|
|||||||
|
|
||||||
// It's a bit beefy to pass studies; probably only need to be reactive on `studyInstanceUIDs` and activeViewport?
|
// It's a bit beefy to pass studies; probably only need to be reactive on `studyInstanceUIDs` and activeViewport?
|
||||||
// Note: This does not cleanly handle `studies` prop updating with panel open
|
// Note: This does not cleanly handle `studies` prop updating with panel open
|
||||||
const isDisabled = menuOption.isDisabled(this.props.studies);
|
const isDisabled =
|
||||||
|
typeof menuOption.isDisabled === 'function' &&
|
||||||
|
menuOption.isDisabled(this.props.studies);
|
||||||
|
|
||||||
if (hasActiveContext && !isDisabled) {
|
if (hasActiveContext && !isDisabled) {
|
||||||
const menuOptionEntry = {
|
const menuOptionEntry = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user