Skip to content

Commit

Permalink
fix: opt in to import.meta.* properties
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored and bbbbbbbbbbbbba committed Mar 30, 2024
1 parent 09d064f commit b937be7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/src/composables/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function useLinkTo(path) {
}

export function useToSignIn(redirect) {
if (!redirect && process.client) {
if (!redirect && import.meta.client) {
redirect = window.location.pathname;
}
useLinkTo("/user/signin?redirect=" + encodeURIComponent(redirect));
Expand Down
2 changes: 1 addition & 1 deletion site/src/middleware/fetch.global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineNuxtRouteMiddleware(async () => {
const nuxtApp = useNuxtApp()

// 服务端渲染,或者客服端渲染
if (process.server || (process.client && !nuxtApp.isHydrating)) {
if (import.meta.server || (import.meta.client && !nuxtApp.isHydrating)) {
await load()
}

Expand Down

0 comments on commit b937be7

Please sign in to comment.