Skip to content

Commit

Permalink
Fix #8 undefined Github user
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteMX committed Jan 4, 2016
1 parent a20c46a commit cd9a3f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ module.exports = yeoman.generators.Base.extend({
this.current.name = srcFolderContent[0];
}
if (!extfs.isEmptySync(this.destinationPath('src/package.xml'))) {
this.isNew = false;
var pkgXml = fs.readFileSync(this.destinationPath('src/package.xml')).toString();
parser.parseString(pkgXml, function (err, result) {
this.isNew = false;
if (err) {
this.log('Error: ' + err);
process.exit(0);
Expand Down Expand Up @@ -193,7 +193,7 @@ module.exports = yeoman.generators.Base.extend({
this.widget.date = (new Date()).toLocaleDateString();
this.widget.copyright = this.props.copyright;
this.widget.license = this.props.license;
this.widget.github = this.props.github !== '<none>' ? '"http://github.com/' + this.props.github + '/' + this.widget.widgetName + '"' : false;
this.widget.github = (this.props.github !== '<none>' && typeof this.props.github !== 'undefined') ? '"http://github.com/' + this.props.github + '/' + this.widget.widgetName + '"' : false;

// Using grunt (future version will include Gulp)
this.widget.builder = 'grunt';
Expand Down

0 comments on commit cd9a3f1

Please sign in to comment.