Skip to content

Commit c60bb5a

Browse files
committed
fix(validator): about promise type checking error
1 parent 70649e2 commit c60bb5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/validator/validator.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</template>
2020

2121
<script type="text/ecmascript-6">
22-
import { parallel, cb2PromiseWithResolve, isUndef, isFunc, isString, isArray, isObject } from '../../common/helpers/util'
22+
import { parallel, cb2PromiseWithResolve, isUndef, isFunc, isString, isArray } from '../../common/helpers/util'
2323
import { rules } from '../../common/helpers/validator'
2424
import localeMixin from '../../common/mixins/locale'
2525
import template from '../../common/helpers/string-template'
@@ -183,7 +183,7 @@
183183
ret: err
184184
})
185185
}
186-
if (isObject(ret) && isFunc(ret.then)) {
186+
if (typeof ret === 'object' && isFunc(ret.then)) {
187187
ret.then(resolve).catch(reject)
188188
} else if (isFunc(ret)) {
189189
ret(resolve, reject)

0 commit comments

Comments
 (0)