diff --git a/apps/generator/lib/generator.js b/apps/generator/lib/generator.js index b7286ce2b..cb4ffe950 100644 --- a/apps/generator/lib/generator.js +++ b/apps/generator/lib/generator.js @@ -759,7 +759,7 @@ class Generator { // Check if the filename dictates it should be separated let wasSeparated = false; for (const prop in fileNamesForSeparation) { - if (Object.prototype.hasOwnProperty.call(fileNamesForSeparation, prop) && stats.name.includes(`$$${prop}$$`)) { + if (Object.hasOwn(fileNamesForSeparation, prop) && stats.name.includes(`$$${prop}$$`)) { await this.generateSeparateFiles(asyncapiDocument, fileNamesForSeparation[prop], prop, stats.name, root); const templateFilePath = path.relative(this.templateContentDir, path.resolve(root, stats.name)); fs.unlink(path.resolve(this.targetDir, templateFilePath), next);