Skip to main content
Question

setComponentPropertyReferences() fails: Could not create a new component property reference


Brian Hackworth

In a plugin, I’ve got code that’s trying to apply and instance swap property to particular node in a component.

The code is 

   const prop = Object.keys(this.componentSet().componentPropertyDefinitions).find((key) => key.startsWith("Peek view#"));
    if (prop) {
      try {
        const newRefs = {
          mainComponent: prop,
        };
        console.log(newRefs);
        peekView.componentPropertyReferences = newRefs;
      } catch (error) {
        console.error(`Failed to set peek view property reference for ${prop}:`, error);
      }
    }

This generates a log message showing that (I think!) the new property references are correct:

{
    "mainComponent": "Peek view#208:0"
}

But the assignment fails and throws this exception:

{
    "message": "in set_componentPropertyReferences: Could not create a new component property reference."
}

 

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings