Skip to content

Commit

Permalink
Fix bug with importing archives
Browse files Browse the repository at this point in the history
Seems to be some kind of race condition, but I'm not really clear about it.
  • Loading branch information
klembot committed Mar 16, 2014
1 parent 421f837 commit 7d6e8fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ TwineApp = Backbone.Marionette.Application.extend(

// create a story object

var story = window.app.stories.create({ name: $story.attr('data-name') });
var story = window.app.stories.create({ name: $story.attr('data-name') }, { wait: true });

// and child passages

Expand All @@ -147,7 +147,7 @@ TwineApp = Backbone.Marionette.Application.extend(
story: story.id,
left: parseInt(posBits[0]),
top: parseInt(posBits[1])
});
}, { wait: true });

if ($passage.attr('data-id') == startPassageId)
story.save({ startPassage: passage.id });
Expand Down

0 comments on commit 7d6e8fa

Please sign in to comment.