File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ export default Vue.extend({
4444
4545 computed : {
4646 innerValue ( ) {
47- return this . value !== void 0 && this . value !== null
48- ? ( this . multiple === true ? Array . from ( this . value ) : [ this . value ] )
47+ return Object ( this . value ) === this . value
48+ ? ( 'length' in this . value ? Array . from ( this . value ) : [ this . value ] )
4949 : [ ]
5050 } ,
5151
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export default {
4040 } ,
4141
4242 __processFiles ( e , files ) {
43- files = Array . prototype . slice . call ( files || e . target . files )
43+ files = Array . from ( files || e . target . files )
4444
4545 // filter file types
4646 if ( this . accept !== void 0 ) {
@@ -145,10 +145,10 @@ export const FileValueMixin = {
145145 : void 0
146146 )
147147
148- if ( this . value !== void 0 && this . value !== null ) {
148+ if ( Object ( this . value ) === this . value ) {
149149 ( 'length' in this . value
150- ? Array . prototype . slice . call ( this . value )
151- : [ this . value ]
150+ ? Array . from ( this . value )
151+ : [ this . value ]
152152 ) . forEach ( file => {
153153 dt . items . add ( file )
154154 } )
You can’t perform that action at this time.
0 commit comments