mirror of
https://github.com/foomo/foomo-docs.git
synced 2025-10-16 12:35:40 +00:00
safe local storage access
This commit is contained in:
parent
cef1cb0f74
commit
428eb8b8bf
@ -1,5 +1,10 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
|
||||
if(typeof localStorage == "undefined") {
|
||||
var localStorage = {setItem:(name, value) => {}, getItem: (name) => {return null}};
|
||||
}
|
||||
|
||||
export const IsItCool = (props: {
|
||||
children: any;
|
||||
topic: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user