title: Property description must be an object error when my properties are object
body: <p>I am trying to build a small cart system where the addToCart() function is provided with an id and that id is then used to be one of the key of the cart object.</p>
  <p>However, I keep getting an error: <code>TypeError: Property description must be an object: 2</code> that happens in the second else. I can't figure out why tho..</p>
  <pre><code>export function addToCart (id) {
    window.localStorage.getItem('cart');
    if (window.localStorage.getItem('cart') === null) {
      var cart = {};
      Object.defineProperties(cart, {
        [id]: 1,
        writable: true
      });
      window.localStorage.setItem('cart', JSON.stringify({ [id]: 1 }));
    } else {
      var cartp = JSON.parse(window.localStorage.getItem('cart'));
      if (cartp[id] === undefined) {
        Object.defineProperties(cartp, {
          [id]: 1,
          writable: true
        });
      } else {
        Object.defineProperties(cartp, {
          [id]: cartp[id] + 1,
          writable: true
        });
      }
      window.localStorage.setItem('cart', cartp);
    }
  }
  
  </code></pre>