You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
The default value for an unknown file.type in the above src\utils\Template.ts snippet is an empty string, while its equivalent in getIconForFileType of src\models\types.ts is the string "txt-ext-file-icon". However from observing rendered files in the DirectoryTree, these two default values still give the same icon.
It would be appropriate to note that without the above modifications the code still works well. I'm just pointing it out since it would make it easy to include additional file types later.
There seems to be a sort of code duplication here:
WebAssemblyStudio/src/utils/Template.ts
Lines 72 to 83 in 49afdef
Given that the below code is to handle such case:
WebAssemblyStudio/src/models/types.ts
Lines 234 to 261 in 49afdef
The default value for an unknown
file.typein the abovesrc\utils\Template.tssnippet is an empty string, while its equivalent ingetIconForFileTypeofsrc\models\types.tsis the string"txt-ext-file-icon". However from observing rendered files in the DirectoryTree, these two default values still give the same icon.We can correct this duplication by modifying:
WebAssemblyStudio/src/utils/Template.ts
Line 22 in 49afdef
to
and replacing:
WebAssemblyStudio/src/utils/Template.ts
Lines 72 to 83 in 49afdef
with
It would be appropriate to note that without the above modifications the code still works well. I'm just pointing it out since it would make it easy to include additional file types later.