diff options
| author | Antony Lesuisse <al@openerp.com> | 2014-06-29 03:48:32 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2014-06-29 04:01:24 +0200 |
| commit | 4bc43e6ac28e783885db04d634d2bf3cca2048fc (patch) | |
| tree | e78b74f9198aff2bbc41ddf121ad175bb94f19f7 | |
| parent | c60798d3b04d8c425f2521c41039afd531b0ee9d (diff) | |
[FIX] website snippet editor initialisation
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 64854442af7..61a60b2b0c5 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -1565,7 +1565,9 @@ */ _readXMLData: function() { var self = this; - this.$el = this.BuildingBlock.$snippets.filter(function () { return $(this).data("snippet-id") == self.snippet_id; }).clone(); + if(this && this.BuildingBlock && this.BuildingBlock.$snippets) { + this.$el = this.BuildingBlock.$snippets.filter(function () { return $(this).data("snippet-id") == self.snippet_id; }).clone(); + } var $options = this.$overlay.find(".oe_overlay_options"); if ($options.find(".oe_options ul li").length) { $options.find(".oe_options").removeClass("hidden"); |
