Skip to content

Commit

Permalink
#464411 - code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
infloent committed May 28, 2024
1 parent 53219e1 commit c718c5d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion blocks/section-metadata/section-metadata.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import { collectAttributes } from '../../scripts/libs.js';
import ComponentBase from '../../scripts/component-base.js';
import { stringToArray } from '../../scripts/libs.js';

Expand Down
3 changes: 1 addition & 2 deletions scripts/component-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ export default class ComponentBase extends HTMLElement {
configByClasses,
this.Handler.observedAttributes,
);
// this.componentName ??= componentName;
this.webComponentName ??= this.initOptions.webComponentName;

this.mergeConfigs();
this.setAttributesClassesAndProps();
this.addDefaultsToNestedConfig();
Expand Down
2 changes: 1 addition & 1 deletion scripts/component-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class ComponentLoader {
componentName,
targets = [],
loaderConfig,
configByClasses, // To be replaced with `attributesValues`
configByClasses,
attributesValues,
externalConfigName,
componentConfig,
Expand Down
1 change: 0 additions & 1 deletion scripts/libs.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ export const configFromClasses = {

if (isBreakpoint) value = value.slice(classBreakpoint.length + 1);

// this should be done outside and run through the methods
const componentName = nestedComponentsNames.find((prefix) => value.startsWith(prefix));
if (componentName) {
acc[componentName] ??= { componentName, active: true };
Expand Down

0 comments on commit c718c5d

Please sign in to comment.