@rspress/plugin-api-docgen 0.0.0-nightly-20231014160137 → 0.0.0-nightly-20231016160331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7001,12 +7001,16 @@ var docgen = async ({
7001
7001
  `Unable to parse API document in ${moduleSourceFilePath}`
7002
7002
  );
7003
7003
  }
7004
- languages.forEach((language) => {
7005
- apiDocMap[`${key}-${language}`] = generateTable(
7006
- componentDoc,
7007
- language
7008
- );
7009
- });
7004
+ if (languages.length > 0) {
7005
+ languages.forEach((language) => {
7006
+ apiDocMap[`${key}-${language}`] = generateTable(
7007
+ componentDoc,
7008
+ language
7009
+ );
7010
+ });
7011
+ } else {
7012
+ apiDocMap[key] = generateTable(componentDoc, "en");
7013
+ }
7010
7014
  }
7011
7015
  } catch (e) {
7012
7016
  if (e instanceof Error) {