fix: opt in to import.meta.* properties (#364)

This commit is contained in:
Daniel Roe
2024-03-28 16:59:41 +00:00
committed by GitHub
parent 2191f46214
commit d9996e0d9d
25 changed files with 40 additions and 40 deletions

View File

@@ -18,7 +18,7 @@ const loadScript = () => {
};
const setupForUser = () => {
if (process.server || !user.value || !featureBaseOrganization ||isImpersonating.value) return
if (import.meta.server || !user.value || !featureBaseOrganization ||isImpersonating.value) return
window.Featurebase(
"identify",
{
@@ -49,7 +49,7 @@ const setupForUser = () => {
}
onMounted(() => {
if (process.server) return
if (import.meta.server) return
// Setup base
if (!window.hasOwnProperty('Featurebase') || typeof window.Featurebase !== "function") {
@@ -64,7 +64,7 @@ onMounted(() => {
})
watch(user, (val) => {
if (process.server || !val) return
if (import.meta.server || !val) return
loadScript()
setupForUser()