mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 18:02:46 +08:00
FIX: Testing environment did NOT like Discourse.URL
This commit is contained in:
parent
721472dab4
commit
62592215f4
|
@ -26,8 +26,10 @@ Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.LoadMore, {
|
|||
},
|
||||
|
||||
_readjustScrollPosition: function() {
|
||||
var scrollTo = Discourse.Session.currentProp('topicListScrollPosition');
|
||||
if (Discourse.URL.get('router.url').indexOf('/more') === -1) { scrollTo = 0; }
|
||||
var scrollTo = Discourse.Session.currentProp('topicListScrollPosition'),
|
||||
url = document.location.href;
|
||||
|
||||
if (url && url.indexOf('/more') === -1) { scrollTo = 0; }
|
||||
|
||||
if (typeof scrollTo !== "undefined") {
|
||||
Em.run.schedule('afterRender', function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user