mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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() {
|
_readjustScrollPosition: function() {
|
||||||
var scrollTo = Discourse.Session.currentProp('topicListScrollPosition');
|
var scrollTo = Discourse.Session.currentProp('topicListScrollPosition'),
|
||||||
if (Discourse.URL.get('router.url').indexOf('/more') === -1) { scrollTo = 0; }
|
url = document.location.href;
|
||||||
|
|
||||||
|
if (url && url.indexOf('/more') === -1) { scrollTo = 0; }
|
||||||
|
|
||||||
if (typeof scrollTo !== "undefined") {
|
if (typeof scrollTo !== "undefined") {
|
||||||
Em.run.schedule('afterRender', function() {
|
Em.run.schedule('afterRender', function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user