Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(ngc): don't replace deeplink config if an existing one exists
Browse files Browse the repository at this point in the history
  • Loading branch information
danbucholtz committed Sep 27, 2017
1 parent c51ac93 commit eeed98b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ngc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
convertDeepLinkConfigEntriesToString,
getUpdatedAppNgModuleContentWithDeepLinkConfig,
filterTypescriptFilesForDeepLinks,
hasExistingDeepLinkConfig,
purgeDeepLinkDecorator
} from './deep-linking/util';
import { Logger } from './logger/logger';
Expand Down Expand Up @@ -50,8 +51,10 @@ export function transformTsForDeepLinking(context: BuildContext) {
tsFile.content = purgeDeepLinkDecorator(tsFile.content);
});
const tsFile = context.fileCache.get(getStringPropertyValue(Constants.ENV_APP_NG_MODULE_PATH));
const deepLinkString = convertDeepLinkConfigEntriesToString(getParsedDeepLinkConfig());
tsFile.content = getUpdatedAppNgModuleContentWithDeepLinkConfig(tsFile.path, tsFile.content, deepLinkString);
if (!hasExistingDeepLinkConfig(tsFile.path, tsFile.content)) {
const deepLinkString = convertDeepLinkConfigEntriesToString(getParsedDeepLinkConfig());
tsFile.content = getUpdatedAppNgModuleContentWithDeepLinkConfig(tsFile.path, tsFile.content, deepLinkString);
}
}
return Promise.resolve();
}
Expand Down

0 comments on commit eeed98b

Please sign in to comment.