You've already forked AstralRinth
forked from didirus/AstralRinth
Fix Cloudflare Pages build (#1285)
* fix(temp): remove box shadows from tailwind config * fix(temp): "polyfill" global during build process * refactor: use `import.meta` instead of deprecated `process` * oops: replace `process.server` as well
This commit is contained in:
@@ -465,7 +465,7 @@ const {
|
||||
} = useLazyFetch(
|
||||
() => {
|
||||
const config = useRuntimeConfig();
|
||||
const base = process.server ? config.apiBaseUrl : config.public.apiBaseUrl;
|
||||
const base = import.meta.server ? config.apiBaseUrl : config.public.apiBaseUrl;
|
||||
|
||||
const params = [`limit=${maxResults.value}`, `index=${sortType.value.name}`];
|
||||
|
||||
@@ -589,7 +589,7 @@ function onSearchChange(newPageNumber) {
|
||||
|
||||
refreshSearch();
|
||||
|
||||
if (process.client) {
|
||||
if (import.meta.client) {
|
||||
const obj = getSearchUrl((currentPage.value - 1) * maxResults.value, true);
|
||||
router.replace({ path: route.path, query: obj });
|
||||
}
|
||||
@@ -751,7 +751,7 @@ function toggleEnv(environment, sendRequest) {
|
||||
}
|
||||
|
||||
function onSearchChangeToTop(newPageNumber) {
|
||||
if (process.client) {
|
||||
if (import.meta.client) {
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user