mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Fix tracker build.
This commit is contained in:
parent
373dbf50ba
commit
6ea6e2e27d
2 changed files with 2 additions and 12 deletions
10
lib/web.js
10
lib/web.js
|
|
@ -61,17 +61,9 @@ export const setItem = (key, data, session) => {
|
|||
}
|
||||
};
|
||||
|
||||
function tryParse(value) {
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export const getItem = (key, session) =>
|
||||
typeof window !== 'undefined'
|
||||
? tryParse((session ? sessionStorage : localStorage).getItem(key))
|
||||
? JSON.parse((session ? sessionStorage : localStorage).getItem(key) || null)
|
||||
: null;
|
||||
|
||||
export const removeItem = (key, session) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
import 'dotenv/config';
|
||||
import buble from '@rollup/plugin-buble';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
|
||||
export default {
|
||||
|
|
@ -9,5 +7,5 @@ export default {
|
|||
file: 'public/umami.js',
|
||||
format: 'iife',
|
||||
},
|
||||
plugins: [resolve(), buble({ objectAssign: true }), terser({ compress: { evaluate: false } })],
|
||||
plugins: [buble({ objectAssign: true }), terser({ compress: { evaluate: false } })],
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue