mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-09 11:22:44 +08:00
add protection against creating an action/store with no name
This commit is contained in:
+5
-2
@@ -3,8 +3,11 @@ var util = require('util');
|
||||
var ScriptBase = require('../script-base.js');
|
||||
|
||||
var ActionGenerator = module.exports = function ActionGenerator(args, options, config) {
|
||||
args[0] += 'ActionCreators';
|
||||
ScriptBase.apply(this, arguments);
|
||||
if (!args[0]) console.log('\n Please specify a name for this action creator \n');
|
||||
else {
|
||||
args[0] += 'ActionCreators';
|
||||
ScriptBase.apply(this, arguments)
|
||||
}
|
||||
};
|
||||
|
||||
util.inherits(ActionGenerator, ScriptBase);
|
||||
|
||||
Reference in New Issue
Block a user