refactor(ivy): remove duplicate global (#25756)

PR Close #25756
This commit is contained in:
Kara Erickson 2018-08-30 17:08:14 -07:00 committed by Misko Hevery
parent 2379ad1a4b
commit b06f1c0087
3 changed files with 1 additions and 12 deletions

View File

@ -97,8 +97,6 @@ export function getRendererFactory(): RendererFactory3 {
return rendererFactory;
}
let currentElementNode: LElementNode|null = null;
export function getCurrentSanitizer(): Sanitizer|null {
return viewData && viewData[SANITIZER];
}
@ -797,7 +795,6 @@ export function elementStart(
const node: LElementNode =
createLNode(index, TNodeType.Element, native !, name, attrs || null, null);
currentElementNode = node;
if (attrs) {
setUpAttributes(native, attrs);
@ -1311,7 +1308,6 @@ export function elementEnd(): void {
ngDevMode && assertNodeType(previousOrParentNode, TNodeType.Element);
currentQueries && (currentQueries = currentQueries.addNode(previousOrParentNode));
queueLifecycleHooks(previousOrParentNode.tNode.flags, tView);
currentElementNode = null;
elementDepthCount--;
}
@ -1514,8 +1510,7 @@ export function elementStyling<T>(
classDeclarations?: (string | boolean | InitialStylingFlags)[] | null,
styleDeclarations?: (string | boolean | InitialStylingFlags)[] | null,
styleSanitizer?: StyleSanitizeFn | null): void {
const lElement = currentElementNode !;
const tNode = lElement.tNode;
const tNode = previousOrParentNode.tNode;
if (!tNode.stylingTemplate) {
// initialize the styling template.
tNode.stylingTemplate =

View File

@ -431,9 +431,6 @@
{
"name": "createViewQuery"
},
{
"name": "currentElementNode"
},
{
"name": "defineComponent"
},

View File

@ -1316,9 +1316,6 @@
{
"name": "createViewQuery"
},
{
"name": "currentElementNode"
},
{
"name": "dateGetter"
},