Browse Source

Fix Component TS

improve-page-frames
Artur Arseniev 2 months ago
parent
commit
9331a70f07
  1. 4
      packages/core/src/dom_components/model/Component.ts

4
packages/core/src/dom_components/model/Component.ts

@ -1025,7 +1025,7 @@ export default class Component extends StyleableModel<ComponentProperties> {
* Returns component's classes as an array of strings * Returns component's classes as an array of strings
* @return {Array} * @return {Array}
*/ */
getClasses() { getClasses(): string[] {
const attr = this.getAttributes(); const attr = this.getAttributes();
const classStr = attr.class; const classStr = attr.class;
return classStr ? classStr.split(' ') : []; return classStr ? classStr.split(' ') : [];
@ -1520,7 +1520,7 @@ export default class Component extends StyleableModel<ComponentProperties> {
* @param {Boolean} [opts.noCustom] Avoid custom name assigned to the component. * @param {Boolean} [opts.noCustom] Avoid custom name assigned to the component.
* @returns {String} * @returns {String}
* */ * */
getName(opts: { noCustom?: boolean } = {}) { getName(opts: { noCustom?: boolean } = {}): string {
const { em } = this; const { em } = this;
const { type, tagName, name } = this.attributes; const { type, tagName, name } = this.attributes;
const defName = type || tagName; const defName = type || tagName;

Loading…
Cancel
Save