Skip to content

Fix observe property string name #19411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class UmbContentWorkspaceViewEditPropertyElement extends UmbLitElement {

override willUpdate(changedProperties: Map<string, any>) {
super.willUpdate(changedProperties);
if (changedProperties.has('type') || changedProperties.has('variantId') || changedProperties.has('_context')) {
if (changedProperties.has('property') || changedProperties.has('variantId') || changedProperties.has('_context')) {
Comment on lines 34 to +36
Copy link
Preview

Copilot AI May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider extracting the observed property keys ('property', 'variantId', '_context') into a constant or array to avoid repeating magic strings and simplify future maintenance.

Copilot uses AI. Check for mistakes.

if (this.variantId && this.property && this._context) {
const propertyVariantId = new UmbVariantId(
this.property.variesByCulture ? this.variantId.culture : null,
Expand Down
Loading