diff --git a/src/commands/view/ComponentStyleClear.js b/src/commands/view/ComponentStyleClear.js index 9762d45c6..d6354353a 100644 --- a/src/commands/view/ComponentStyleClear.js +++ b/src/commands/view/ComponentStyleClear.js @@ -5,7 +5,7 @@ export default { const { target } = opts; const dc = ed.DomComponents; const type = target.get('type'); - const len = dc.getWrapper().find(`[data-gjs-type="${type}"]`).length; + const len = dc.getWrapper().findType(type).length; const toRemove = []; if (!len) {