File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,11 @@ function isBrowser(){
88 return typeof window !== 'undefined' ;
99}
1010
11- /* istanbul ignore next */
12- function isHttps ( ) {
13- return typeof location !== 'undefined' && location . protocol === 'https:'
14- }
15-
16- /* istanbul ignore next */
17- function shouldUseProxy ( ) {
18- return isBrowser ( ) && ! isHttps ( )
19- }
20-
2111/* istanbul ignore next */
2212function injectProxy ( Service ) {
2313 return ( cepWithLeftPad ) => Service ( cepWithLeftPad , PROXY_URL )
2414}
2515
26- export const CepAbertoService = shouldUseProxy ( ) ? injectProxy ( CepAberto ) : CepAberto
27- export const CorreiosService = shouldUseProxy ( ) ? injectProxy ( Correios ) : Correios
16+ export const CepAbertoService = isBrowser ( ) ? injectProxy ( CepAberto ) : CepAberto
17+ export const CorreiosService = isBrowser ( ) ? injectProxy ( Correios ) : Correios
2818export const ViaCepService = ViaCep
You can’t perform that action at this time.
0 commit comments