File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ import state from '../store/state'
7777import axios from ' axios'
7878function fetchGalleries (results ) {
7979 return Promise .all (results .map (record => {
80- return axios .get (' https://github-trending-api.now.sh/repositories?language=' + record .urlParam )
80+ return axios .get (' https://github-trending-api.now.sh/repositories?language=' + encodeURIComponent ( record .urlParam ) )
8181 })).then (gal => {
8282 var papa = gal .filter (function (el ) {
8383 return el .data .length > 0
@@ -127,7 +127,7 @@ export default {
127127 var papa = fetchGalleries (vm .results )
128128 papa .then (result => {
129129 vm .wt = result .map (a => {
130- var url = a .toLowerCase (). replace (' ' , ' -' )
130+ var url = a .replace (/ \s + / g , ' -' ). toLowerCase ( )
131131 return {
132132 name: a,
133133 urlParam: url
You can’t perform that action at this time.
0 commit comments