Skip to content

Commit

Permalink
cli(generators): fix entry path value quotes sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvdutt committed Nov 5, 2018
1 parent a1bd573 commit 2e36d79
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/generators/utils/entry.ts
Expand Up @@ -20,7 +20,7 @@ export default function entry(self: IEntry, answer: {
}): Promise<{}> {
let entryIdentifiers: string[];
let result: Promise<{}>;
if (answer.entryType === true) {
if (answer.entryType) {
result = self
.prompt([
InputValidate(
Expand Down Expand Up @@ -98,9 +98,7 @@ export default function entry(self: IEntry, answer: {
singularEntry: string,
}): string => {
let { singularEntry } = singularEntryAnswer;
if (singularEntry.indexOf("\"") >= 0) {
singularEntry = singularEntry.replace(/"/g, "'");
}
singularEntry = `\'${singularEntry.replace(/"|'/g, "")}\'`;
if (singularEntry.length <= 0) {
self.usingDefaults = true;
}
Expand Down

0 comments on commit 2e36d79

Please sign in to comment.