diff --git a/framework/core/js/src/common/Application.js b/framework/core/js/src/common/Application.js index d5a955664..3b36cb43a 100644 --- a/framework/core/js/src/common/Application.js +++ b/framework/core/js/src/common/Application.js @@ -185,11 +185,11 @@ export default class Application { * @return {Object|null} * @public */ - preloadedDocument() { - if (this.data.document) { - const results = this.store.pushPayload(this.data.document); + preloadedApiDocument() { + if (this.data.apiDocument) { + const results = this.store.pushPayload(this.data.apiDocument); - this.data.document = null; + this.data.apiDocument = null; return results; } diff --git a/framework/core/js/src/forum/components/DiscussionList.js b/framework/core/js/src/forum/components/DiscussionList.js index dd0f155cc..1ab208ca5 100644 --- a/framework/core/js/src/forum/components/DiscussionList.js +++ b/framework/core/js/src/forum/components/DiscussionList.js @@ -150,7 +150,7 @@ export default class DiscussionList extends Component { * @return {Promise} */ loadResults(offset) { - const preloadedDiscussions = app.preloadedDocument(); + const preloadedDiscussions = app.preloadedApiDocument(); if (preloadedDiscussions) { return m.deferred().resolve(preloadedDiscussions).promise; diff --git a/framework/core/js/src/forum/components/DiscussionPage.js b/framework/core/js/src/forum/components/DiscussionPage.js index 247a622e8..2abb88e0c 100644 --- a/framework/core/js/src/forum/components/DiscussionPage.js +++ b/framework/core/js/src/forum/components/DiscussionPage.js @@ -130,7 +130,7 @@ export default class DiscussionPage extends Page { this.near = m.route.param('near') || 0; this.discussion = null; - const preloadedDiscussion = app.preloadedDocument(); + const preloadedDiscussion = app.preloadedApiDocument(); if (preloadedDiscussion) { // We must wrap this in a setTimeout because if we are mounting this // component for the first time on page load, then any calls to m.redraw