vscode-nested-tags icon indicating copy to clipboard operation
vscode-nested-tags copied to clipboard

Bug: Cannot destructure property `displayName` of 'undefined' or 'null'.

Open blakedietz opened this issue 6 years ago • 3 comments

When typing a lot of tags out, I seem to be getting this error for the currently released project at v1.0.1.

Cannot destructure property `displayName` of 'undefined' or 'null'.

blakedietz avatar Feb 05 '19 18:02 blakedietz

I was noticing that incorrect entries were being left in the tree from watching typing of tags in relatively large documents ~500 lines. I'm thinking that I'll just need to debounce on file change to reduce the chance of the wrong tags being put into the tree.

blakedietz avatar Feb 05 '19 22:02 blakedietz

The source of this is caused by tags that have a . in them.

<!--@nested-tags:some.md-->

Breaks the plugin.

blakedietz avatar Feb 21 '19 20:02 blakedietz

I found another case can also cause this problem: using a real tab instead of spaces before the tag keword. For example:

---
title: Hello nested tags
tags:
	- topic  # a real tab instead of spaces
	- here/is/a/nested/example   # a real tab instead of spaces
---

Debugging is non-trivial. It will be great if the extension can complain something it can not handle...

qingbyin avatar Mar 13 '20 04:03 qingbyin