File tree 1 file changed +10
-6
lines changed
modules/ensemble/lib/util
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1003,12 +1003,16 @@ class Utils {
1003
1003
/// prefix the asset with the app root directory (i.e. ensemble/apps/<app-name>/assets/), plus
1004
1004
/// stripping any unnecessary query params (e.g. anything after the first ?)
1005
1005
static String getLocalAssetFullPath (String asset) {
1006
- String provider = EnsembleConfigService .config["definitions" ]? ['from' ];
1007
- if (provider == 'local' ) {
1008
- String path = EnsembleConfigService .config["definitions" ]? ['local' ]? ["path" ];
1009
- return '${path }/assets/${stripQueryParamsFromAsset (asset )}' ;
1010
- }
1011
- else {
1006
+ try {
1007
+ String provider = EnsembleConfigService .config["definitions" ]? ['from' ];
1008
+ if (provider == 'local' ) {
1009
+ String path =
1010
+ EnsembleConfigService .config["definitions" ]? ['local' ]? ["path" ];
1011
+ return '${path }/assets/${stripQueryParamsFromAsset (asset )}' ;
1012
+ } else {
1013
+ return 'ensemble/assets/${stripQueryParamsFromAsset (asset )}' ;
1014
+ }
1015
+ } catch (e) {
1012
1016
return 'ensemble/assets/${stripQueryParamsFromAsset (asset )}' ;
1013
1017
}
1014
1018
}
You can’t perform that action at this time.
0 commit comments