Skip to content

Commit 6ff84d1

Browse files
committed
fix: ✏️ inline and make some code
1 parent f55988a commit 6ff84d1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Validator from './core/Validator'
88
// augment typings of Vue.js
99
import './vue'
1010

11-
export class AxiosHttp {
11+
class AxiosHttp {
1212
installed = false
1313
parsedQs: IParseOptions = {
1414
comma: true,
@@ -22,7 +22,7 @@ export class AxiosHttp {
2222
const { $axios, errorProperty, parsedQs } = defaultOption
2323
BaseService.$http = $axios
2424
BaseService.$errorProperty = errorProperty || 'errors'
25-
BaseService.$parsedQs = parsedQs || this.parsedQs
25+
BaseService.$parsedQs = parsedQs
2626
Vue.mixin({
2727
beforeCreate() {
2828
this.$options.$errors = {} as never
@@ -39,6 +39,7 @@ export class AxiosHttp {
3939
})
4040
}
4141
}
42+
4243
export * from './util'
4344
export type { ValidatorType }
4445
export { Validator, BaseService }

src/util/formData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function hasFilesDeep(obj: any): boolean {
5252
if (obj === null) return false
5353
if (typeof obj === 'object') {
5454
for (const key in obj) {
55-
if (hasOwnProperty(obj, key) && isFile(obj[key])) return true
55+
if (isFile(obj[key])) return true
5656
}
5757
}
5858
if (isArray(obj)) {

0 commit comments

Comments
 (0)