Skip to content

Commit

Permalink
fix(wcp-preview-editor-link): ignore slot attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
davidenke authored Aug 11, 2023
2 parents 0b727fd + 358a78e commit 8c8825b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { getManifest } from '@/utils/manifest.utils.js';
import { litKey } from '@/utils/parser.utils.js';
import type { ElementData } from '../stage-editor/stage-editor.utils.js';

const IGNORED_ATTRIBUTES = ['slot'];

/**
* Prepares an initial state object for the given element definition by:
* 1. Read all controllable fields from the element definition (from properties)
Expand All @@ -15,7 +17,7 @@ export function readCurrentElementData(ref: HTMLElement): ElementData {
const elementData = getManifest().elements.get(ref.tagName.toLowerCase());

// store all attributes already collected by the element definition
const skipAttributes: string[] = [];
const skipAttributes: string[] = [...IGNORED_ATTRIBUTES];

// 1. get all controllable fields with their current values
const fields =
Expand Down

0 comments on commit 8c8825b

Please sign in to comment.