Skip to content

Commit

Permalink
fix(): hotfix, change if to else if in compute symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Dec 7, 2020
1 parent d685b68 commit 889901b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/provider/provider.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function transform(options: ProviderOptions): ProviderOptions {
if (target.name.includes('.')) {
target.className = strings.classify(target.name).replace('.', '');
} else {
target.className = target.name;
target.className = strings.classify(target.name);
}

target.path = strings.dasherize(location.path);
Expand All @@ -63,7 +63,7 @@ function transform(options: ProviderOptions): ProviderOptions {
function generate(options: ProviderOptions) {
return (context: SchematicContext) =>
apply(url(join('./files' as Path, options.language)), [
options.spec ? noop() : filter(path => !path.endsWith('.spec.ts')),
options.spec ? noop() : filter((path) => !path.endsWith('.spec.ts')),
template({
...strings,
...options,
Expand Down
3 changes: 1 addition & 2 deletions src/utils/module.declarator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export class ModuleDeclarator {
const target = Object.assign({}, options);
if (options.className) {
target.symbol = options.className;
}
else if (options.type !== undefined) {
} else if (options.type !== undefined) {
target.symbol = classify(options.name).concat(capitalize(options.type));
} else {
target.symbol = classify(options.name);
Expand Down

0 comments on commit 889901b

Please sign in to comment.