[FIX] ignore invalid url hashchanges

bzr revid: al@openerp.com-20111010203441-7b04w9ipkz1oxq8e
This commit is contained in:
Antony Lesuisse 2011-10-10 22:34:41 +02:00
parent d0f2a6315d
commit 7f223e2d48
1 changed files with 5 additions and 3 deletions

View File

@ -68,9 +68,11 @@ db.web.ActionManager = db.web.Widget.extend({
},
on_url_hashchange: function(url) {
var self = this;
self.rpc("/web/action/load", { action_id: url.action_id }, function(result) {
self.do_action(result.result);
});
if(url && url.action_id) {
self.rpc("/web/action/load", { action_id: url.action_id }, function(result) {
self.do_action(result.result);
});
}
},
do_action: function(action, on_close) {
var type = action.type.replace(/\./g,'_');