Skip to content
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

Nv 3475 - typeerror cannot create property buttons on string #5172

Merged

Conversation

djabarovgeorge
Copy link
Contributor

What change does this PR introduce?

Resolve the issue where the user is storing an invalid value under message-template.cta.action

Why was this change needed?

bug

Other information (Screenshots)

Copy link

linear bot commented Feb 8, 2024

Copy link

netlify bot commented Feb 8, 2024

Deploy Preview for dev-web-novu failed.

Name Link
🔨 Latest commit aa341b7
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/65c4dc9eb511da0008c32a24

Comment on lines +21 to +23
if ((command?.cta?.action as IMessageAction | undefined | '') === '') {
throw new ApiException('Please provide a valid CTA action');
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not like this solution but this would be the best way we could validate and alert the API user with a proper message, and this is because we do not support nested command validation REF, I will raise the topic with the team.

@@ -41,7 +41,7 @@ export function InAppWidgetPreview({

function onRemoveTemplate() {
setIsButtonsTemplateSelected(false);
onChange('');
onChange({});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This solved the web side issue.

Copy link
Contributor

@LetItRock LetItRock left a comment

Choose a reason for hiding this comment

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

🔥

@LetItRock LetItRock merged commit dd09d68 into next Feb 9, 2024
25 of 29 checks passed
@LetItRock LetItRock deleted the nv-3475-typeerror-cannot-create-property-buttons-on-string branch February 9, 2024 17:16
LetItRock added a commit that referenced this pull request Feb 9, 2024
…property-buttons-on-string

Nv 3475 - typeerror cannot create property buttons on string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants