Skip to content

Commit

Permalink
Reword console warning and add extra check to use formatRichText
Browse files Browse the repository at this point in the history
  • Loading branch information
likimmy committed Aug 14, 2023
1 parent 47103ff commit d627612
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cards/faq-accordion/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class faq_accordionCardComponent extends BaseCard['faq-accordion'] {
if (profile.answerV2 && profile.answerV2.html) {
profileAnswer = profile.answerV2.html;
} else if (profile.answerV2 && profile.answerV2.json) {
console.warn('JSON is not supported, please switch to HTML.')
console.warn('JSON is not supported, please convert to HTML.')
} else if (profile.answer) {
profileAnswer = ANSWERS.formatRichText(profile.answer, "answer", linkTarget);
}

return {
Expand Down
4 changes: 3 additions & 1 deletion cards/multilang-faq-accordion/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class multilang_faq_accordionCardComponent extends BaseCard['multilang-faq-accor
if (profile.answerV2 && profile.answerV2.html) {
profileAnswer = profile.answerV2.html;
} else if (profile.answerV2 && profile.answerV2.json) {
console.warn('JSON is not supported, please switch to HTML.')
console.warn('JSON is not supported, please convert to HTML.')
} else if (profile.answer) {
profileAnswer = ANSWERS.formatRichText(profile.answer, "answer", linkTarget);
}

return {
Expand Down

0 comments on commit d627612

Please sign in to comment.