You need to sign in to do that
Don't have an account?

LWC publish question
I've got the following lines of code that work just fine when boatId has an Id value (string)
sendMessageService(boatId) { // explicitly pass boatId to the parameter recordId const payload = { recordId: boatId }; publish(this.messageContext, BOATMC, payload); }But when I set boatId to nothing the publish fires but the subscriber never gets the message. What am I doing wrong, how do I publish a null boatId?
This forces the @wire to raise an error rather than silently fail.