Skip to content

Commit

Permalink
fix: reload check, close #152
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 8, 2021
1 parent 888832d commit 88c614b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/client/logic/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function useSlideInfo(id: number | undefined): UseSlideInfo {
}
}
const url = `/@slidev/slide/${id}.json`
const { data: info, execute } = useFetch(url).get().json()
const { data: info, execute } = useFetch(url).json().get()

execute()

Expand Down
4 changes: 2 additions & 2 deletions packages/parser/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ export function resolveConfig(headmatter: any, themeMeta: SlidevThemeMeta = {})
}
const config: SlidevConfig = {
...defaultConfig,
...themeMeta.defaults || {},
...headmatter.config || {},
...themeMeta.defaults,
...headmatter.config,
...headmatter,
fonts: resolveFonts({
...themeMeta.defaults?.fonts,
Expand Down
1 change: 1 addition & 0 deletions packages/slidev/node/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export async function resolveOptions(

if (themeRoots.length) {
const themeMeta = await getThemeMeta(theme, join(themeRoots[0], 'package.json'))
data.themeMeta = themeMeta
if (themeMeta)
data.config = parser.resolveConfig(data.headmatter, themeMeta)
}
Expand Down

0 comments on commit 88c614b

Please sign in to comment.