Fix race condition with polling when saving notes

eTagPoll may not be initialized yet when we save a note.
Polling is initialized only after discussions are loaded
This commit is contained in:
Heinrich Lee Yu 2019-07-15 12:14:37 +08:00
parent 920fc2e389
commit fcc7d5c016
2 changed files with 7 additions and 2 deletions

View File

@ -357,11 +357,11 @@ export const poll = ({ commit, state, getters, dispatch }) => {
};
export const stopPolling = () => {
eTagPoll.stop();
if (eTagPoll) eTagPoll.stop();
};
export const restartPolling = () => {
eTagPoll.restart();
if (eTagPoll) eTagPoll.restart();
};
export const fetchData = ({ commit, state, getters }) => {

View File

@ -0,0 +1,5 @@
---
title: Fix commenting before discussions are loaded
merge_request: 30724
author:
type: fixed