File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -627,11 +627,8 @@ function vtkPLYReader(publicAPI, model) {
627627 } ;
628628
629629 // Fetch the actual data arrays
630- publicAPI . loadData = ( option = { } ) => {
631- const promise = fetchData ( model . url , option ) ;
632- promise . then ( publicAPI . parse ) ;
633- return promise ;
634- } ;
630+ publicAPI . loadData = ( option = { } ) =>
631+ fetchData ( model . url , option ) . then ( publicAPI . parse ) ;
635632
636633 publicAPI . parse = ( content ) => {
637634 if ( typeof content === 'string' ) {
Original file line number Diff line number Diff line change @@ -240,11 +240,8 @@ function vtkSTLReader(publicAPI, model) {
240240 } ;
241241
242242 // Fetch the actual data arrays
243- publicAPI . loadData = ( option = { } ) => {
244- const promise = fetchData ( model . url , option ) ;
245- promise . then ( publicAPI . parse ) ;
246- return promise ;
247- } ;
243+ publicAPI . loadData = ( option = { } ) =>
244+ fetchData ( model . url , option ) . then ( publicAPI . parse ) ;
248245
249246 publicAPI . parse = ( content ) => {
250247 if ( typeof content === 'string' ) {
Original file line number Diff line number Diff line change @@ -46,11 +46,8 @@ function vtkPolyDataReader(publicAPI, model) {
4646 } ;
4747
4848 // Fetch the actual data arrays
49- publicAPI . loadData = ( option = { } ) => {
50- const promise = fetchData ( model . url , option ) ;
51- promise . then ( publicAPI . parseAsText ) ;
52- return promise ;
53- } ;
49+ publicAPI . loadData = ( option = { } ) =>
50+ fetchData ( model . url , option ) . then ( publicAPI . parseAsText ) ;
5451
5552 publicAPI . parseAsText = ( content ) => {
5653 if ( ! content ) {
You can’t perform that action at this time.
0 commit comments