File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,22 @@ let newFeaturesInLatestVersion = [];
14
14
* Gets the new features in the latest version of Parse Dashboard.
15
15
*/
16
16
async function getNewFeaturesInLatestVersion ( ) {
17
- // Get latest version
18
- const packageJson = ( await import ( 'package-json' ) ) . default ;
19
- const latestPackage = await packageJson ( 'parse-dashboard' , { version : 'latest' , fullMetadata : true } ) ;
20
-
21
17
try {
18
+ // Get latest version
19
+ const packageJson = ( await import ( 'package-json' ) ) . default ;
20
+ const latestPackage = await packageJson ( 'parse-dashboard' , { version : 'latest' , fullMetadata : true } ) ;
21
+
22
22
if ( latestPackage . parseDashboardFeatures instanceof Array ) {
23
23
newFeaturesInLatestVersion = latestPackage . parseDashboardFeatures . filter ( feature => {
24
24
return currentVersionFeatures . indexOf ( feature ) === - 1 ;
25
25
} ) ;
26
26
}
27
27
} catch {
28
+ // Fail silently if fetching the latest package information fails
28
29
newFeaturesInLatestVersion = [ ] ;
29
30
}
30
31
}
31
- getNewFeaturesInLatestVersion ( )
32
+ getNewFeaturesInLatestVersion ( ) . catch ( ( ) => { } )
32
33
33
34
function getMount ( mountPath ) {
34
35
mountPath = mountPath || '' ;
You can’t perform that action at this time.
0 commit comments