Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4237a23

Browse files
fix the http isse
We want to add 'https' in the case that the link does not have 'http' ot 'https' already. i.e if( ! (value.startsWith('http://') || (value.startsWith('https://') ) which on simplification with De Morgans's laws wpuld lead to : if (!value.startsWith('http://') && !value.startsWith('https://'))
1 parent 0eba25e commit 4237a23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/coder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ let coder = new Vue({
106106
},
107107
filters: {
108108
fixURL: value => {
109-
if (!value.startsWith('http://') || !value.startsWith('https://')) {
109+
if (!value.startsWith('http://') && !value.startsWith('https://')) {
110110
value = `https://${value}`;
111111
}
112112
return value;
@@ -195,4 +195,4 @@ let coder = new Vue({
195195
});
196196
}
197197
}
198-
});
198+
});

0 commit comments

Comments
 (0)