Uncaught TypeError: Cannot destructure property `name` of ‘undefined’ or ‘null’
See the docs: Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed. In other words, the default parameter will not be assigned if null gets passed: function fn(arg = ‘foo’) { console.log(arg); } fn(null); Destructure in the first line of the function instead: function test … Read more