Files
vat-api.eu/node_modules/nuxt/dist/app/compat/interval.js
2026-02-13 22:02:30 +01:00

12 lines
529 B
JavaScript

import { createError } from "../composables/error.js";
const intervalError = "[nuxt] `setInterval` should not be used on the server. Consider wrapping it with an `onNuxtReady`, `onBeforeMount` or `onMounted` lifecycle hook, or ensure you only call it in the browser by checking `import.meta.client`.";
export const setInterval = import.meta.client ? globalThis.setInterval : (() => {
if (import.meta.dev) {
throw createError({
status: 500,
message: intervalError
});
}
console.error(intervalError);
});