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> {
160
160
private async handleDownloadClick ( ) {
161
161
try {
162
162
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" )
163
166
164
167
// 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 )
167
169
168
170
// Download navdata to work dir
169
171
await this . navdataInterface . download_navdata ( pkg . file . url , pkg . format )
You can’t perform that action at this time.
0 commit comments