12 lines
388 B
JavaScript
12 lines
388 B
JavaScript
const fs = require('fs');
|
|
|
|
const file = 'app/(onboarding)/onboarding/page.tsx';
|
|
let code = fs.readFileSync(file, 'utf8');
|
|
|
|
code = code.replace(
|
|
'try { return localStorage.getItem("vibn:firstName") || ""; } catch { return ""; }',
|
|
'try { return typeof window !== "undefined" ? localStorage.getItem("vibn:firstName") || "" : ""; } catch { return ""; }'
|
|
);
|
|
|
|
fs.writeFileSync(file, code);
|