mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 16:01:36 +08:00
FIX: ensures successive topic hydrates doesn't override category (#12865)
This bug has first been seen when loading similar topics, minimum repro: - Have a topic named "Something Foo Bar" with a category. - Call this in console: ``` Discourse.currentUser.store.find("similar-topic", { title: "Something foo bar", raw: "" }) ``` - Navigate to latest (no full refresh) - The category from the topic should have disappeared
This commit is contained in:
parent
8b87cb07c3
commit
71fd01c8ec
@ -614,6 +614,12 @@ Topic.reopenClass({
|
|||||||
MUTED: 0,
|
MUTED: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
munge(json) {
|
||||||
|
// ensure we are not overriding category computed property
|
||||||
|
delete json.category;
|
||||||
|
return json;
|
||||||
|
},
|
||||||
|
|
||||||
createActionSummary(result) {
|
createActionSummary(result) {
|
||||||
if (result.actions_summary) {
|
if (result.actions_summary) {
|
||||||
const lookup = EmberObject.create();
|
const lookup = EmberObject.create();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user