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
The code that generates a link to a discussion reads `discussion.tags().length without checking that the relationship returns an array first, leading in errors "trying to read property of undefined".
I doubt this situation happens often, if at all, without additional third party extension, but the actual problematic extensions should be irrelevant, the code cannot assume the method returns an array and this would show errors if Typescript typings were enforced.
This issue is based on a report on Discuss, but can be seen by simple static reading of the code.
flarum-blog/js/src/forum/utils/discussionRouting.js
Line 21 in 0d6cdf6
The code that generates a link to a discussion reads `discussion.tags().length without checking that the relationship returns an array first, leading in errors "trying to read property of undefined".
I doubt this situation happens often, if at all, without additional third party extension, but the actual problematic extensions should be irrelevant, the code cannot assume the method returns an array and this would show errors if Typescript typings were enforced.
Reference https://discuss.flarum.org/d/33733-typeerror-etags-is-not-a-function/3
The text was updated successfully, but these errors were encountered: