Compare commits
3 Commits
v0.2.0-dev
...
v0.2.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | b12dd9a3b8 | |
Derrick Hammer | 9d153cde40 | |
Derrick Hammer | 0ab6cf0ff0 |
|
@ -1,3 +1,10 @@
|
|||
# [0.2.0-develop.29](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.28...v0.2.0-develop.29) (2023-08-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* handle localStorage being undefined ([0ab6cf0](https://git.lumeweb.com/LumeWeb/libweb/commit/0ab6cf0ff095209f0a4d83c4295ecd5558de8a89))
|
||||
|
||||
# [0.2.0-develop.28](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.27...v0.2.0-develop.28) (2023-08-10)
|
||||
|
||||
# [0.2.0-develop.27](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.26...v0.2.0-develop.27) (2023-07-21)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.28",
|
||||
"version": "0.2.0-develop.29",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.28",
|
||||
"version": "0.2.0-develop.29",
|
||||
"dependencies": {
|
||||
"@lumeweb/community-portals": "^0.1.0-develop.6",
|
||||
"@lumeweb/libportal": "0.2.0-develop.17",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libweb",
|
||||
"version": "0.2.0-develop.28",
|
||||
"version": "0.2.0-develop.29",
|
||||
"main": "lib/index.js",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
|
|
|
@ -120,11 +120,17 @@ export function savePortals() {
|
|||
url: item.portalUrl,
|
||||
} as Portal;
|
||||
});
|
||||
window.localStorage.setItem("portals", JSON.stringify(portals));
|
||||
if (typeof globalThis.localStorage !== "undefined") {
|
||||
globalThis.localStorage.setItem("portals", JSON.stringify(portals));
|
||||
}
|
||||
}
|
||||
|
||||
export function loadSavedPortals(): Portal[] | null {
|
||||
let portals = window.localStorage.getItem("portals");
|
||||
let portals: string | null = null;
|
||||
|
||||
if (typeof globalThis.localStorage !== "undefined") {
|
||||
portals = globalThis.localStorage.getItem("portals");
|
||||
}
|
||||
|
||||
if (!portals) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue