fix translation in Fx 4 trunk builds
This commit is contained in:
parent
9740c42666
commit
95003c88e4
1 changed files with 14 additions and 1 deletions
|
@ -1016,7 +1016,20 @@ Zotero.Translate.prototype._generateSandbox = function() {
|
||||||
translation.setHandler(arg1,
|
translation.setHandler(arg1,
|
||||||
function(obj, item) {
|
function(obj, item) {
|
||||||
try {
|
try {
|
||||||
arg2(obj, item);
|
if(Zotero.isFx4) {
|
||||||
|
// item is wrapped in an XPCCrossOriginWrapper that we can't get rid of
|
||||||
|
// except by making a deep copy. seems to be due to
|
||||||
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=580128
|
||||||
|
// hear that? that's the sound of me banging my head against the wall.
|
||||||
|
// if there is no better way to do this soon, i am going to need a
|
||||||
|
// brain transplant...
|
||||||
|
var unwrappedItem = JSON.parse(JSON.stringify(item));
|
||||||
|
unwrappedItem.complete = item.complete;
|
||||||
|
} else {
|
||||||
|
var unwrappedItem = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
arg2(obj, unwrappedItem);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
me.error(false, e);
|
me.error(false, e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue