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

**URL:** <https://meta.discourse.org/t/cannot-call-get-with-undefined-key-post-get-is-not-a-function/45160>\
**Category:** Development\
**Created:** [2 ביוני,‏ 2016,‏ 9:23pm UTC](https://meta.discourse.org/t/cannot-call-get-with-undefined-key-post-get-is-not-a-function/45160 "2016-06-02T21:23:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)\
**Post date:** [14 באוגוסט,‏ 2021,‏ 9:03pm UTC](https://meta.discourse.org/t/cannot-call-get-with-undefined-key-post-get-is-not-a-function/45160/4 "2021-08-14T21:03:32Z")

</div>

In my local development, working on a plugin, I get a similarly strange behavior with respect to the composer.

The create topic button works in my local discourse instance, but then if I try to add a new create topic button somewhere else (and add some code to make that happen), it messes up, and all create topic buttons throughout the (local) site stop working.

And I get this error:

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

This continues even if I remove the code I added that seemed to cause the error in the first place. That is, once I get this error, even if I return all the code back to the way it was before, the error keeps coming up anytime I want to hit the create topic button.

The only thing that, I think, makes the error goes away, is if I remove the file entirely where the new code was (so, not having the file there–seems to work; having the file there with no code in it–the error continues).

Does anyone have any idea about this? It’s been a big hindrance to my development.

---

_[View the full topic](https://meta.discourse.org/t/cannot-call-get-with-undefined-key-post-get-is-not-a-function/45160)._
