Skip to content

Commit

Permalink
Workaround babel#10179 in proposal-object-rest-spread (babel#10200)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo authored and AdamRamberg committed Jul 17, 2019
1 parent 149b2ff commit c21fd8e
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -455,6 +455,11 @@ export default declare((api, opts) => {
try {
helper = file.addHelper("objectSpread2");
} catch {
// TODO: This is needed to workaround https://github.com/babel/babel/issues/10187
// and https://github.com/babel/babel/issues/10179 for older @babel/core versions
// where #10187 isn't fixed.
this.file.declarations["objectSpread2"] = null;

// objectSpread2 has been introduced in v7.5.0
// We have to maintain backward compatibility.
helper = file.addHelper("objectSpread");
Expand Down

0 comments on commit c21fd8e

Please sign in to comment.