Skip to content

Commit 3f64297

Browse files
committed
Allow relative replay URLs.
1 parent 304bc07 commit 3f64297

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

Dev/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ function a(){
6161
message: 'Property "url" is not a URL.'
6262
});
6363
}
64-
if(!isUrl(setup.arena.replay)){
65-
errors.push({
66-
path: [index_0, 'arena', 'replay'],
67-
message: 'Property "replay" is not a URL.'
68-
});
69-
}
7064
}else if(setup.settings){
7165
errors.push({
7266
path: [index_0, 'settings'],

Replay/index.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,22 +188,7 @@ function a(){
188188
_element_previousReplaysController.classList.remove('hidden');
189189
});
190190
function onValidate(json){
191-
function isUrl(string){
192-
let url;
193-
try{
194-
url = new URL(string);
195-
}catch(e){
196-
return false;
197-
}
198-
return url.protocol === 'http:' || url.protocol === 'https:';
199-
}
200191
let errors = [];
201-
if(json.header !== undefined && json.header.defaultReplay !== undefined && !isUrl(json.header.defaultReplay)){
202-
errors.push({
203-
path: ['header'],
204-
message: 'Property "defaultReplay" is not a URL.'
205-
});
206-
}
207192
if(json.body !== undefined && typeof json.body.matchLogs !== 'object'){
208193
errors.push({
209194
path: ['body'],

0 commit comments

Comments
 (0)