fix: suppress No grammar found for language: "none" messages while building

This commit is contained in:
Dorian Niemiec 2024-09-22 07:25:55 +02:00
parent 712887d86e
commit d32e6826b5

View file

@ -126,7 +126,7 @@ const customPortableTextComponents: PortableTextComponents = {
const language = value.language || "none";
const grammar = Prism.languages[language];
if (!grammar) {
if (language != "none" && !grammar) {
console.error(`No grammar found for language: "${language}"`);
}