diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/document-controller.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 1f339fe7..57289448 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -118,8 +118,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
118 | //TODO: Check for appropiate structures | 118 | //TODO: Check for appropiate structures |
119 | handleExecuteSave: { | 119 | handleExecuteSave: { |
120 | value: function(event) { | 120 | value: function(event) { |
121 | //Text and HTML document classes should return the same save object for fileSave | 121 | if(!!this.activeDocument){ |
122 | this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this)); | 122 | //Text and HTML document classes should return the same save object for fileSave |
123 | this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this)); | ||
124 | } | ||
123 | } | 125 | } |
124 | }, | 126 | }, |
125 | //////////////////////////////////////////////////////////////////// | 127 | //////////////////////////////////////////////////////////////////// |
@@ -459,5 +461,5 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
459 | value: function() { | 461 | value: function() { |
460 | return "userDocument_" + (this._iframeCounter++); | 462 | return "userDocument_" + (this._iframeCounter++); |
461 | } | 463 | } |
462 | } | 464 | } |
463 | }); | 465 | }); |