From 5ee9b3cd19d4a13fcec155deb6c01a062d8e7012 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 18 May 2016 10:33:21 +0800 Subject: [PATCH] FIX: Don't throw uncaught error warning when in readonly mode. --- app/assets/javascripts/discourse/lib/screen-track.js.es6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/lib/screen-track.js.es6 b/app/assets/javascripts/discourse/lib/screen-track.js.es6 index 60704ac4bbf..fa52eab6fcf 100644 --- a/app/assets/javascripts/discourse/lib/screen-track.js.es6 +++ b/app/assets/javascripts/discourse/lib/screen-track.js.es6 @@ -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