mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 12:45:49 +01:00
Don't print an Exception on paste when the selection is empty.
This commit is contained in:
@@ -152,7 +152,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
clipboardRead: function clipboardRead() {
|
clipboardRead: function clipboardRead() {
|
||||||
let str;
|
let str = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
|
const clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
|
||||||
@@ -175,10 +175,7 @@ const Dactyl = Module("dactyl", {
|
|||||||
str = data.data.substring(0, dataLen.value / 2);
|
str = data.data.substring(0, dataLen.value / 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {}
|
||||||
dactyl.reportError(e, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user