Skip to content

Commit

Permalink
fix: use plugin client
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Oct 3, 2024
1 parent 66a94b4 commit 52fcdf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export default defineNuxtPlugin(async (nuxtApp) => {
}
}

if (options.toolbar && client?.repositoryName) {
if (options.toolbar && prismicPlugin.client?.repositoryName) {
// Add toolbar
useHead({
script: [{
key: 'prismic-preview',
src: `https://static.cdn.prismic.io/prismic.min.js?repo=${client.repositoryName}&new=true`,
src: `https://static.cdn.prismic.io/prismic.min.js?repo=${prismicPlugin.client.repositoryName}&new=true`,
async: true,
defer: true,
crossorigin: 'anonymous',
Expand Down

0 comments on commit 52fcdf1

Please sign in to comment.