From 119b554354707493ed778ec445bb6a1b6f959a98 Mon Sep 17 00:00:00 2001 From: enzo - Eduardo Garcia Date: Thu, 5 Mar 2015 20:05:02 +0000 Subject: [PATCH] Fix drupal services to handle latest version of content type fields definitiosn from entity rest extra --- backbone.drupal.services.js | 4 +++- bower.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backbone.drupal.services.js b/backbone.drupal.services.js index 01be1dc..4120df2 100644 --- a/backbone.drupal.services.js +++ b/backbone.drupal.services.js @@ -37,7 +37,9 @@ Backbone.Drupal.Models.Node = Backbone.Drupal.Models.Base.extend({ if(this.backform) { var attributes = []; _.each(data, function(element, index, list) { - attributes[index] = element[0].value; + if(!_.isEmpty(element[0])) { + attributes[index] = element[0].value; + } }); return attributes; } diff --git a/bower.json b/bower.json index fcfab4c..08b8f1c 100644 --- a/bower.json +++ b/bower.json @@ -4,7 +4,7 @@ "backbone.drupal.js", "backbone.drupal.services.js" ], - "version": "0.2.2-beta", + "version": "0.2.3-alpha", "homepage": "http://enzolutions.com/projects/backbone_drupal/", "author": { "name": "enzo - Eduardo Garcia",