Skip to content

Commit da1f6a2

Browse files
author
alexperez
committed
fix: handle empty string in value check for code rendering
1 parent 8897708 commit da1f6a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ApiExampleRender.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export class ApiExampleRender extends LitElement {
235235
// This just sanitizes the schema and renders unprocessed data.
236236
this._codeValue = value;
237237
// @ts-ignore
238-
} else if (value || value === false || value === 0) {
238+
} else if (value || value === false || value === 0 || value === '') {
239239
let lang;
240240
const type = this.mediaType;
241241
if (type) {

0 commit comments

Comments
 (0)