Fix type, restyle

This commit is contained in:
Ilya Ig. Petrov 2017-06-17 20:20:25 +05:00
parent 040d598d67
commit 092c999c59

View File

@ -160,7 +160,7 @@ export default function getProxyEditor(theState) {
}; };
const splitBySemi = (proxyString) => proxyString.replace(/#.*$/mg, '').trim().split(/\s*;\s*/g).filter((s) => s); const splitBySemi = (proxyString) => proxyString.replace(/#.*$/mg, '').trim().split(/\s*;\s*/g).filter((s) => s);
const joinBySemi = (strs) => strs.join(';\n') + ';'; const joinBySemi = (strs) => strs.join(';\n') + ';';
const normilizeProxyString = (str) => joinBySemi(splitBySemi(str)); const normalizeProxyString = (str) => joinBySemi(splitBySemi(str));
const PROXY_TYPE_LABEL_PAIRS = [['PROXY', 'PROXY/HTTP'],['HTTPS'],['SOCKS4'],['SOCKS5'],['SOCKS']]; const PROXY_TYPE_LABEL_PAIRS = [['PROXY', 'PROXY/HTTP'],['HTTPS'],['SOCKS4'],['SOCKS5'],['SOCKS']];
@ -437,7 +437,7 @@ export default function getProxyEditor(theState) {
handleTextareaChange(that, event) { handleTextareaChange(that, event) {
that.setState({ that.setState({
stashedExports: normilizeProxyString(event.target.value), stashedExports: normalizeProxyString(event.target.value),
}); });
} }