It is not a sufficient treatment of selections.
There are now 4 categories:
sel.isNull()
sel.isPropertySelection()
sel.isContainerSelection()
sel.isTableSelection()
As in the above case, the code suggests that you want to have property selections only.
A good way is to do either
if (sel.isPropertySelection()) {
...
} else {
...
}
As here: https://github.com/substance/science-writer/blob/2d906772519e939bbaf665e1617cd818fcc84715/src/state_handlers.js#L20
It is not a sufficient treatment of selections. There are now 4 categories: sel.isNull() sel.isPropertySelection() sel.isContainerSelection() sel.isTableSelection()
As in the above case, the code suggests that you want to have property selections only. A good way is to do either
or using a guard: