@@ -261,6 +261,13 @@ define(function (require, exports, module) {
261261 return result . promise ( ) ;
262262 }
263263
264+ /**
265+ * Checks whether a build is applicable to the current platform.
266+ */
267+ function _checkBuildApplicability ( buildInfo ) {
268+ return ! buildInfo . platforms || buildInfo . platforms [ brackets . getPlatformInfo ( ) ] ;
269+ }
270+
264271 /**
265272 * Return a new array of version information that is newer than "buildNumber".
266273 * Returns null if there is no new version information.
@@ -270,20 +277,23 @@ define(function (require, exports, module) {
270277 // should get through the search quickly.
271278 var lastIndex = 0 ;
272279 var len = versionInfo . length ;
280+ var versionEntry ;
281+ var validBuildEntries ;
273282
274283 while ( lastIndex < len ) {
275- if ( versionInfo [ lastIndex ] . buildNumber <= buildNumber ) {
284+ versionEntry = versionInfo [ lastIndex ] ;
285+ if ( versionEntry . buildNumber <= buildNumber ) {
276286 break ;
277287 }
278288 lastIndex ++ ;
279289 }
280290
281291 if ( lastIndex > 0 ) {
282- return versionInfo . slice ( 0 , lastIndex ) ;
292+ // Filter recent update entries based on applicability to current platform
293+ validBuildEntries = versionInfo . slice ( 0 , lastIndex ) . filter ( _checkBuildApplicability ) ;
283294 }
284295
285- // No new version info
286- return null ;
296+ return validBuildEntries ;
287297 }
288298
289299 /**
@@ -446,7 +456,7 @@ define(function (require, exports, module) {
446456 return ;
447457 }
448458
449- if ( allUpdates ) {
459+ if ( allUpdates && allUpdates . length > 0 ) {
450460 // Always show the "update available" icon if any updates are available
451461 var $updateNotification = $ ( "#update-notification" ) ;
452462
0 commit comments