Skip to content

Commit

Permalink
[#523] - fix for version string undefined error
Browse files Browse the repository at this point in the history
  • Loading branch information
timkim committed Feb 20, 2018
1 parent 3027298 commit 9e9e3c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion www/js/analytic.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
*/

function getVersion() {
return $('#version').html().split(':')[1].trim().split('<')[0];
var versionStringSplit = $('#version').html().split(':');
if( versionStringSplit.length >= 1) {
return 'PhoneGap Developer App'
} else {
return versionStringSplit[1].trim().split('<')[0];
}
};
})();

0 comments on commit 9e9e3c1

Please sign in to comment.