File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
examples/gauge/Components Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,12 @@ export class InterfaceSample extends DisplayComponent<InterfaceSampleProps> {
160160 private async handleDownloadClick ( ) {
161161 try {
162162 if ( ! this . navdataInterface . getIsInitialized ( ) ) throw new Error ( "Navdata interface not initialized" )
163+
164+ const format = this . dropdownRef . instance . getNavigationDataFormat ( )
165+ if ( ! format ) throw new Error ( "Unable to fetch package: No navigation data format has been selected" )
163166
164167 // Get default package for client
165- const pkg = await packages . getPackage ( this . dropdownRef . instance . getNavdataFormat ( ) as string )
166-
168+ const pkg = await packages . getPackage ( format )
167169
168170 // Download navdata to work dir
169171 await this . navdataInterface . download_navdata ( pkg . file . url , pkg . format )
You can’t perform that action at this time.
0 commit comments