Skip to content

Commit

Permalink
Check for undefined sequenceData
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkh committed Jul 4, 2017
1 parent 0fb3d81 commit d62280b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mi-model",
"version": "0.4.11",
"version": "0.4.12",
"description": "Model for representing Molecular Interaction data",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var model;


$.get( "json/EBI-9082861.json", function( data ) {
$.get( "json/EBI-1202920.json", function( data ) {
model = new MIModel(data).load().then(function(m) {
window.m = m;
});
Expand Down
4 changes: 2 additions & 2 deletions src/models/Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ var Regions = require('./Region').Regions;

var Feature = Backbone.Model.extend({

initialize: function(attrs) {
initialize: function(attrs = {}) {

var sequenceData = attrs.sequenceData;
var sequenceDataCol = new Regions();


if (attrs.sequenceData !== null) {
if (attrs.sequenceData !== null && typeof attrs.sequenceData !== 'undefined') {

var abc = _.map(attrs.sequenceData, function(s) {
s.feature = this;
Expand Down

0 comments on commit d62280b

Please sign in to comment.