DEV: Ensure helper or post exist before decorations (#27)
This commit is contained in:
parent
c95026fde0
commit
2896c69a72
|
@ -73,6 +73,9 @@ export default apiInitializer("0.11.1", (api) => {
|
||||||
|
|
||||||
api.decorateCookedElement(
|
api.decorateCookedElement(
|
||||||
(post, helper) => {
|
(post, helper) => {
|
||||||
|
if (!helper || !post) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const canEdit = helper.widget.attrs.canEdit;
|
const canEdit = helper.widget.attrs.canEdit;
|
||||||
|
|
||||||
if (!canEdit) {
|
if (!canEdit) {
|
||||||
|
|
Loading…
Reference in New Issue