fix generate from/add as chapter an empty selection

This commit is contained in:
alexadam 2016-09-16 11:51:47 +03:00
parent 2b5ebdef92
commit 06027ea882
2 changed files with 9 additions and 0 deletions

View file

@ -63,6 +63,14 @@ function sendMessage(tabId, action, justAddToBuffer) {
chrome.tabs.sendMessage(tabId, {
type: action
}, function(response) {
if (response.length === 0) {
if (justAddToBuffer) {
alert('Cannot add an empty selection as chapter!');
} else {
alert('Cannot generate the eBook from an empty selection!');
}
window.close();
}
if (!justAddToBuffer) {
buildEbook([response]);
} else {