Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't throw when CLR indexer not found #718

Merged
merged 2 commits into from Apr 4, 2020
Merged

Conversation

sebastienros
Copy link
Owner

Fixes #500

@sebastienros sebastienros requested a review from lahma April 4, 2020 01:01
@@ -490,6 +490,8 @@ private static string ToStringNonString(JsValue o)
return Null.Text;
case InternalTypes.Object when o is IPrimitiveInstance p:
return ToString(ToPrimitive(p.PrimitiveValue, Types.String));
case InternalTypes.Object when o is Interop.IObjectWrapper p:
return ToString(ToPrimitive(p.Target?.ToString(), Types.String));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if the ToPrimitive is needed here as we know that ToString produces string? Basically could just be p.Target?.ToString()?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks, didn't if it would do something special, changing

@sebastienros sebastienros merged commit 1b6ad93 into dev Apr 4, 2020
@sebastienros sebastienros deleted the sebros/nilindexer branch April 4, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"No matching indexer found" w/ .net object assigned to prototype field
2 participants