Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot 34699434e4 chore(release): 0.2.0-develop.8 [skip ci]
# [0.2.0-develop.8](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.7...v0.2.0-develop.8) (2023-06-23)

### Bug Fixes

* make getActivePortals return an array, not a set ([d8e2046](d8e2046ebd))
* need to use length, not size ([5db1217](5db121774e))
2023-06-23 23:17:02 +00:00
Derrick Hammer 5db121774e
fix: need to use length, not size 2023-06-23 19:16:18 -04:00
Derrick Hammer 97df324828
Merge remote-tracking branch 'origin/develop' into develop 2023-06-23 19:14:33 -04:00
Derrick Hammer d8e2046ebd
fix: make getActivePortals return an array, not a set 2023-06-23 19:14:29 -04:00
5 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,11 @@
# [0.2.0-develop.8](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.7...v0.2.0-develop.8) (2023-06-23)
### Bug Fixes
* make getActivePortals return an array, not a set ([d8e2046](https://git.lumeweb.com/LumeWeb/libweb/commit/d8e2046ebda8b428cfcd5470d63a9c09a6047819))
* need to use length, not size ([5db1217](https://git.lumeweb.com/LumeWeb/libweb/commit/5db121774ebf7c4eec4360a299cfb54991091747))
# [0.2.0-develop.7](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.6...v0.2.0-develop.7) (2023-06-23)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.7",
"version": "0.2.0-develop.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.7",
"version": "0.2.0-develop.8",
"dependencies": {
"@lumeweb/libportal": "0.2.0-develop.5",
"@noble/curves": "^1.1.0",

View File

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

View File

@ -7,7 +7,7 @@ const NO_PORTALS_ERROR = [null, "no active portals"] as ErrTuple;
export async function downloadObject(cid: string): Promise<ErrTuple> {
const activePortals = getActivePortals();
if (!activePortals.size) {
if (!activePortals.length) {
return NO_PORTALS_ERROR;
}

View File

@ -50,8 +50,8 @@ export function generatePortalKeyPair(portal: Portal): KeyPair {
};
}
export function getActivePortals(): Set<Client> {
return ACTIVE_PORTALS;
export function getActivePortals(): Client[] {
return [...ACTIVE_PORTALS];
}
export function addActivePortal(portal: Client) {
@ -76,6 +76,7 @@ export function initPortal(portal: Portal) {
addActivePortal(client);
}
export function getPortalSessions() {
let portalSessionsData = window.localStorage.getItem("portals");
let portalSessions: PortalSessionsStore = {};