mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-03-15 10:30:48 +00:00
Allow singular url to validFor
This commit is contained in:
parent
3d1422c91b
commit
4dba3723c4
@ -52,6 +52,7 @@ class Transports {
|
||||
returns: Array of pairs of Url & transport instance [ [ u1, t1], [u1, t2], [u2, t1]]
|
||||
throws: CodingError if urls empty or [undefined...]
|
||||
*/
|
||||
if (typeof urls === "string") urls = [urls];
|
||||
if (!((urls && urls[0]) || ["store", "newlisturls", "newdatabase", "newtable"].includes(func))) {
|
||||
console.error("Transports.validFor called with invalid arguments: urls=", urls, "func=", func); // FOr debugging old calling patterns with [ undefined ]
|
||||
return [];
|
||||
|
@ -51,5 +51,5 @@
|
||||
"test": "cd src; node ./test.js",
|
||||
"help": "echo 'test (test it)'; echo 'build (creates dweb-transports-bundle)'"
|
||||
},
|
||||
"version": "0.1.22"
|
||||
"version": "0.1.23"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user