File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,13 @@ const nodeVersion = computed(() => {
2222 return nodeEngine ?.minVersion || null
2323})
2424
25+ function getReplacementDescription(replacement : ModuleReplacement ) {
26+ if (replacement .type === ' documented' ) return ' '
27+ return props .replacement .description ?? ' '
28+ }
29+
2530const replacementDescription = useMarkdown (() => ({
26- text: (props .replacement as { description ? : string }). description ?? ' ' ,
31+ text: getReplacementDescription (props .replacement ) ,
2732}))
2833 </script >
2934
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ export default defineEventHandler(
44 ( event ) : { mapping : ModuleReplacementMapping ; replacement : ModuleReplacement } | null => {
55 const pkg = getRouterParam ( event , 'pkg' )
66 if ( ! pkg ) return null
7+ if ( ! Object . hasOwn ( all . mappings , pkg ) ) return null
78 const mapping = all . mappings [ pkg ]
89 if ( ! mapping ) return null
910 const replacementId = mapping . replacements [ 0 ]
You can’t perform that action at this time.
0 commit comments