Skip to content

Commit

Permalink
chore: adjust misuse of domClasses class
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaiir committed Apr 7, 2024
1 parent 8978e13 commit 3bb5915
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/form-js-playground/src/components/JSONEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ export function JSONEditor(options = {}) {
this.attachTo = function(_container) {
container = _container;
container.appendChild(view.dom);
domClasses(container, document.body).add('fjs-json-editor');
domClasses(container).add('fjs-json-editor');
};

this.destroy = function() {
if (container && view.dom) {
container.removeChild(view.dom);
domClasses(container, document.body).remove('fjs-json-editor');
domClasses(container).remove('fjs-json-editor');
}
view.destroy();
};
Expand All @@ -103,9 +103,9 @@ export function JSONEditor(options = {}) {
return linter(view => {
const placeholders = view.dom.querySelectorAll('.cm-placeholder');
if (placeholders.length > 0) {
domClasses(container, document.body).add(NO_LINT_CLS);
domClasses(container).add(NO_LINT_CLS);
} else {
domClasses(container, document.body).remove(NO_LINT_CLS);
domClasses(container).remove(NO_LINT_CLS);
}
return [];
});
Expand Down

0 comments on commit 3bb5915

Please sign in to comment.