How about this:
let attribute1, attribute2;
try {
({attribute1, attribute2} = getObject())
} catch (e) {} let attribute1, attribute2;
try {
({attribute1, attribute2} = getObject())
} catch (e) {}So parenthesis are the trick, thanks!