@@ -4,7 +4,7 @@ import type { IParseOptions } from 'qs'
44import { isObject , isArray } from 'lodash'
55import qs from 'qs'
66import Validator from './Validator'
7- import { hasFiles , objectToFormData , removeDoubleSlash } from '../util'
7+ import { hasFiles , objectToFormData } from '../util'
88
99const validator = Validator
1010const UNPROCESSABLE_ENTITY = 422
@@ -98,7 +98,7 @@ class BaseService {
9898 return new Promise < AxiosResponse < T > > ( ( resolve , reject ) => {
9999 const data = hasFiles ( form ) ? objectToFormData ( form ) : form
100100 const endpoint = param ? `/${ this . endpoint } /${ param } ` : `/${ this . endpoint } `
101- const url = this . __getParameterString ( removeDoubleSlash ( endpoint ) )
101+ const url = this . __getParameterString ( endpoint . replace ( / \/ \/ / g , '/' ) )
102102 config = Object . assign ( { } , config , { url, data, method } )
103103 this . $http ( config )
104104 . then ( ( response ) => {
@@ -166,9 +166,7 @@ class BaseService {
166166 }
167167
168168 beforeSubmit ( ) {
169- if ( ! this . $http ) {
170- throw new Error ( 'Vue Axios Http, No http library provided.' )
171- }
169+ if ( ! this . $http ) throw new Error ( 'Vue Axios Http, No http library provided.' )
172170 this . errors . flush ( )
173171 this . errors . processing = true
174172 this . errors . successful = false
0 commit comments