File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
src/idom/client/app/packages/idom-client-react Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1+ import { copyAttributes } from "./utils.js" ;
2+
13function serializeEvent ( event ) {
24 const data = { } ;
35
@@ -23,7 +25,18 @@ const targetTransformCategories = {
2325 currentTime : target . currentTime ,
2426 } ) ,
2527 hasFiles : ( target ) => {
26- return target . type && target . type == "file" ? { files : target . files } : { } ;
28+ if ( target ?. type == "file" ) {
29+ return {
30+ files : Array . from ( target . files ) . map ( ( file ) => ( {
31+ lastModified : file . lastModified ,
32+ name : file . name ,
33+ size : file . size ,
34+ type : file . type ,
35+ } ) ) ,
36+ } ;
37+ } else {
38+ return { } ;
39+ }
2740 } ,
2841} ;
2942
Original file line number Diff line number Diff line change @@ -4,7 +4,14 @@ import serializeEvent from "../src/event-to-object.js";
44import "./tooling/setup.js" ;
55
66const allTargetData = {
7- files : [ "path/to/some/file" ] ,
7+ files : [
8+ {
9+ lastModified : 0 ,
10+ name : "something" ,
11+ type : "some-type" ,
12+ size : 0 ,
13+ } ,
14+ ] ,
815 value : "something" ,
916 currentTime : 35 ,
1017 tagName : null , // overwritten in tests
You can’t perform that action at this time.
0 commit comments