Skip to content

Commit

Permalink
Merge pull request #85 from Lyonard/xliff-to-target-fix
Browse files Browse the repository at this point in the history
[xliff-to-target] Fixed bug on js file download
  • Loading branch information
Ostico committed Mar 8, 2016
2 parents 48ae30c + 109ebe7 commit bd5ef21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Controller/xliffToTargetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function doAction() {
"type" => mime_content_type($file_path),
"message" => "File downloaded! Check your download folder"
));
$this->_filename = $conversion['fileName'];
} else {
$this->error = true;
$this->errorMessage = $conversion[0]['errorMessage'];
Expand Down
2 changes: 1 addition & 1 deletion lib/View/xliffToTarget.html
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@
/* END Editing */
},
complete: function ( e, data ) {
if ( !conversionFailed ) {
if ( conversionFailed == false || JSON.stringify(conversionFailed) === JSON.stringify({}) ) {
console.log( 'completed!!!' );
var result = e.responseJSON; //JSON.parse( data.result );
saveAs( b64toBlob( result.fileContent ), result.fileName );
Expand Down

0 comments on commit bd5ef21

Please sign in to comment.