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."
}
