[FIX] website snippet editor initialisation

This commit is contained in:
Antony Lesuisse 2014-06-29 03:48:32 +02:00
parent c60798d3b0
commit 4bc43e6ac2
1 changed files with 3 additions and 1 deletions

View File

@ -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");