Fix serializing urls

This commit is contained in:
Bill Thornton 2021-10-19 23:57:52 -04:00
parent c97ddc3d2e
commit 4056405ca9
3 changed files with 7 additions and 3 deletions

View File

@ -88,7 +88,12 @@
"ignorePatterns": [ "coverage" ],
"overrides": [
{
"files": [ "./**/*.js" ]
"files": [ "./**/*.js" ],
"globals": {
"AbortController": "readonly",
"URL": "readonly",
"URLSearchParams": "readonly"
}
},
{
"files": [ "./**/*.test.js" ],

View File

@ -33,7 +33,7 @@ export default class ServerStore {
decorate(ServerStore, {
servers: [
format(data => data.map(value => new ServerModel(value.id, value.url, value.info))),
format(data => data.map(value => new ServerModel(value.id, new URL(value.url), value.info))),
observable
],
addServer: action,

View File

@ -3,7 +3,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* globals AbortController, URL */
import normalizeUrl from 'normalize-url';