Cannot call get with undefined key / Post.get is not a function

On my local machine I am using the latest version of Discourse. When I attempt to add a reply within a topic, I get the following error message:

The post.get error occurs in this bit of code:

I did a console.log(post) to see what it contained and the result was an object that has a post number of (...) . EDIT: Clicking on (…) yielded 1.

Additionally, when I try to add a New Topic (within the pipeline or in a topic), I get the error:

Would anyone know how to rectify this? Thanks!

Are you sure post is an Ember object? Have you tried post.post_number?

Isolated it down to something in two of our plugins, both of which reopen the composer controller.

ローカル開発でプラグインを作業中、Composer に関して同様に奇妙な動作が発生しています。

ローカルの Discourse インスタンスでは「トピック作成」ボタンは機能しますが、別の場所に「トピック作成」ボタンを追加し(そのためにいくつかのコードを追加すると)、問題が発生し、サイト全体(ローカル)のすべての「トピック作成」ボタンが機能しなくなります。

そして、以下のエラーが表示されます。

Uncaught Error: Assertion Failed: The key provided to set must be a string or number, you passed undefined

このエラーは、原因となったように思われる追加コードを削除しても解消されません。つまり、一度このエラーが発生すると、元のコードに戻しても、「トピック作成」ボタンを押すたびにエラーが発生し続けます。

エラーを解消する唯一の方法は、新しいコードが含まれていたファイルを完全に削除することのようです(つまり、ファイルが存在しない場合は動作するが、ファイルが存在していても中身が空の場合はエラーが継続します)。

何か心当たりはありませんか?これは私の開発にとって大きな障害となっています。