FIX: Don't throw uncaught error warning when in readonly mode.

This commit is contained in:
Guo Xiang Tan 2016-05-18 10:33:21 +08:00
parent f891430f32
commit 5ee9b3cd19
No known key found for this signature in database
GPG Key ID: 19C321C8952B0F72
1 changed files with 3 additions and 0 deletions

View File

@ -124,6 +124,9 @@ export default class {
const postNumbers = Object.keys(newTimings).map(v => parseInt(v, 10));
controller.readPosts(topicId, postNumbers);
}
}).catch(e => {
const error = e.jqXHR;
if (error.status === 405 && error.responseJSON.error_type === "read_only") return;
});
} else if (this._anonCallback) {
// Anonymous viewer - save to localStorage