Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Don't render directive token from imports in design time #1143

Merged
merged 1 commit into from
Mar 29, 2017

Conversation

ajaybhargavb
Copy link
Contributor

@@ -110,8 +110,14 @@ public override void VisitDirectiveToken(DirectiveTokenIRNode node)
const string TypeHelper = "__typeHelper";

var tokenKind = node.Descriptor.Kind;
if (node.Source == null)
if (!node.Source.HasValue ||
(Context.SourceDocument.FileName != null &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the null check needed here? Is this a workaround for some test issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just to handle the unlikely case of both of them being null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that doesn't matter. Will remove.

Copy link
Member

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asdf

@rynowak
Copy link
Member

rynowak commented Mar 29, 2017

:shipit: after removing silly null check

@ajaybhargavb ajaybhargavb merged commit c1500da into dev Mar 29, 2017
@ajaybhargavb ajaybhargavb deleted the ajbaaska/imports branch March 29, 2017 22:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants