From 64220babbd71635c66c57fdb11314dfef825841b Mon Sep 17 00:00:00 2001 From: Thibault Sottiaux Date: Sat, 13 Feb 2016 15:27:45 +0000 Subject: [PATCH] Consistently initialize default values for Generator. --- lib/stagehand.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/stagehand.dart b/lib/stagehand.dart index 3d05a789..856e5fa3 100644 --- a/lib/stagehand.dart +++ b/lib/stagehand.dart @@ -104,7 +104,8 @@ abstract class Generator implements Comparable { Map vars = { 'projectName': projectName, 'description': description, - 'year': new DateTime.now().year.toString() + 'year': new DateTime.now().year.toString(), + 'author': '' }; if (additionalVars != null) { @@ -113,10 +114,6 @@ abstract class Generator implements Comparable { }); } - if (!vars.containsKey('author')) { - vars['author'] = ''; - } - return Future.forEach(files, (TemplateFile file) { var resultFile = file.runSubstitution(vars); String filePath = resultFile.path;