The document JS payload attribute was previously renamed to apiDocument

This commit is contained in:
Toby Zerner 2018-09-30 09:24:25 +09:30
parent 692194ec7d
commit 083dcc3700
3 changed files with 6 additions and 6 deletions

View File

@ -185,11 +185,11 @@ export default class Application {
* @return {Object|null} * @return {Object|null}
* @public * @public
*/ */
preloadedDocument() { preloadedApiDocument() {
if (this.data.document) { if (this.data.apiDocument) {
const results = this.store.pushPayload(this.data.document); const results = this.store.pushPayload(this.data.apiDocument);
this.data.document = null; this.data.apiDocument = null;
return results; return results;
} }

View File

@ -150,7 +150,7 @@ export default class DiscussionList extends Component {
* @return {Promise} * @return {Promise}
*/ */
loadResults(offset) { loadResults(offset) {
const preloadedDiscussions = app.preloadedDocument(); const preloadedDiscussions = app.preloadedApiDocument();
if (preloadedDiscussions) { if (preloadedDiscussions) {
return m.deferred().resolve(preloadedDiscussions).promise; return m.deferred().resolve(preloadedDiscussions).promise;

View File

@ -130,7 +130,7 @@ export default class DiscussionPage extends Page {
this.near = m.route.param('near') || 0; this.near = m.route.param('near') || 0;
this.discussion = null; this.discussion = null;
const preloadedDiscussion = app.preloadedDocument(); const preloadedDiscussion = app.preloadedApiDocument();
if (preloadedDiscussion) { if (preloadedDiscussion) {
// We must wrap this in a setTimeout because if we are mounting this // 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 // component for the first time on page load, then any calls to m.redraw