fix a regression where on page load, when item was set, a previous query that would not match the item would not be reset

This commit is contained in:
rolux 2011-11-08 09:12:28 +00:00
parent c070cc0cf1
commit 910b67c1c1

View file

@ -147,12 +147,12 @@ pandora.URL = (function() {
$(this).trigger('stop');
});
if (!pandora.$ui.appPanel && state.item && find) {
if (!pandora.$ui.appPanel && state.item && pandora.user.ui.find) {
// on page load, if item is set and there was a query,
// we have to check if the item actually matches the query,
// and otherwise reset find
pandora.api.find({
query: find,
query: pandora.user.ui.find,
positions: [state.item],
sort: [{key: 'id', operator: ''}]
}, function(result) {