lib/juxtapose/application/js/app.js in motion-juxtapose-0.1.1 vs lib/juxtapose/application/js/app.js in motion-juxtapose-0.2.0

- old
+ new

@@ -44,10 +44,16 @@ $scope.devices = _.map(devices, function(device){ return { name: device } }); $scope.iOSVersion = function(spec){ - return spec.directory.match(/([^\/]*)\/[^\/]+\/[^\/]+$/)[1].match(/[\d\.]+/)[0] + version = spec.directory.match(/([^\/]*)\/[^\/]+\/[^\/]+$/)[1] + iosVersion = version.match(/[\d\.]+/) + if(iosVersion){ + return iosVersion[0]; + } else { + return version; + } } var versions = _.uniq(_.map($scope.project.specs, $scope.iOSVersion)) $scope.versions = _.map(versions, function(version){ return { name: version }