diff --git a/components/index.js b/components/index.js
index b4a04b41e..2341df9af 100644
--- a/components/index.js
+++ b/components/index.js
@@ -9,14 +9,16 @@ export function Index({ asyncapi, params = {} }) {
const favicon = generateBase64Favicon(params);
const renderedSpec = renderSpec(asyncapi, params);
let asyncapiScript = ``;
- if(params?.singleFile) {
+ // coerce singleFile param to bool, or "false" string will be true
+ const singleFile = (params?.singleFile === true || params?.singleFile == 'true');
+ if(singleFile) {
asyncapiScript = ``;
}
let styling = `
`;
- if(params?.singleFile) {
+ if(singleFile) {
styling = `