Compare commits

...

3 Commits

Author SHA1 Message Date
semantic-release-bot 00ad1be917 chore(release): 0.2.0-develop.19 [skip ci]
# [0.2.0-develop.19](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.18...v0.2.0-develop.19) (2023-06-26)

### Bug Fixes

* switch to using globalThis, and check if we have localStorage (if not, might be node) ([79273d2](79273d263b))
2023-06-26 06:08:13 +00:00
Derrick Hammer 61c535d8cb
Merge remote-tracking branch 'origin/develop' into develop 2023-06-26 02:07:08 -04:00
Derrick Hammer 79273d263b
fix: switch to using globalThis, and check if we have localStorage (if not, might be node) 2023-06-26 02:07:03 -04:00
4 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,10 @@
# [0.2.0-develop.19](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.18...v0.2.0-develop.19) (2023-06-26)
### Bug Fixes
* switch to using globalThis, and check if we have localStorage (if not, might be node) ([79273d2](https://git.lumeweb.com/LumeWeb/libweb/commit/79273d263b9f65dbe4faf369fa936e8d746d81d2))
# [0.2.0-develop.18](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.17...v0.2.0-develop.18) (2023-06-26)
# [0.2.0-develop.17](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.16...v0.2.0-develop.17) (2023-06-26)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.18",
"version": "0.2.0-develop.19",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.18",
"version": "0.2.0-develop.19",
"dependencies": {
"@lumeweb/community-portals": "^0.1.0-develop.4",
"@lumeweb/libportal": "^0.2.0-develop.10",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.18",
"version": "0.2.0-develop.19",
"main": "lib/index.js",
"type": "module",
"repository": {

View File

@ -75,7 +75,11 @@ export function initPortal(portal: Portal): Client {
}
export function getPortalSessions() {
let portalSessionsData = window.localStorage.getItem("portals");
if (typeof globalThis.localStorage === "undefined") {
return undefined;
}
let portalSessionsData = globalThis.localStorage.getItem("portals");
let portalSessions: PortalSessionsStore = {};
if (portalSessions) {
portalSessions = JSON.parse(