mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Testing environment did NOT like Discourse.URL
This commit is contained in:
parent
721472dab4
commit
62592215f4
1 changed files with 4 additions and 2 deletions
|
@ -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 a new issue