Skip to content

Commit cd9a3f1

Browse files
author
JelteMX
committed
Fix #8 undefined Github user
1 parent a20c46a commit cd9a3f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generators/app/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ module.exports = yeoman.generators.Base.extend({
4343
this.current.name = srcFolderContent[0];
4444
}
4545
if (!extfs.isEmptySync(this.destinationPath('src/package.xml'))) {
46+
this.isNew = false;
4647
var pkgXml = fs.readFileSync(this.destinationPath('src/package.xml')).toString();
4748
parser.parseString(pkgXml, function (err, result) {
48-
this.isNew = false;
4949
if (err) {
5050
this.log('Error: ' + err);
5151
process.exit(0);
@@ -193,7 +193,7 @@ module.exports = yeoman.generators.Base.extend({
193193
this.widget.date = (new Date()).toLocaleDateString();
194194
this.widget.copyright = this.props.copyright;
195195
this.widget.license = this.props.license;
196-
this.widget.github = this.props.github !== '<none>' ? '"http://github.com/' + this.props.github + '/' + this.widget.widgetName + '"' : false;
196+
this.widget.github = (this.props.github !== '<none>' && typeof this.props.github !== 'undefined') ? '"http://github.com/' + this.props.github + '/' + this.widget.widgetName + '"' : false;
197197

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

0 commit comments

Comments
 (0)