title: TypeError: 'set' on proxy: trap returned falsish for property
body: <p>I changed my code from es5 class prototype representation to es6 class representation. But I am getting error </p>
  
  <p>this is the code before and after migration to es6</p>
  
  <p>es5 syntax</p>
  
  <pre><code>function RoutingScreen (context) {
    Object.assign(this, {route} = context)
  }
  
  RoutingScreen.prototype.onEnter = function(state) {
    state.scaning = false
    state.status = 'Scan to continue'
    curState = states.init
  };
  </code></pre>
  
  <p>es6 syntax</p>
  
  <pre><code>class RoutingScreen{
    constructor(context){
      Object.assign(this, {route}= context)
    }
  
  onEnter(state){
      state.scaning = false
      state.status = 'Scan to continue'
      curState = states.init
    }
  }
  </code></pre>
  
  <p>I am getting error like this </p>
  
  <blockquote>
    <p>TypeError: 'set' on proxy: trap returned falsish for property 'scaning'</p>
  </blockquote>
  
  <p>but es5 code is working properly. </p>
  
  <p>I am using node version 8.1</p>
  
  <p>I don't know what i had done wrong here. </p>
  
  <p>this where i called these method</p>
  
  <pre><code>    function setRoute (newRoute) {
          var r = currentRoute()
          console.log('changeRoute from ' + (r?r.route:'""') + ' to ' + newRoute)
          if (r &amp;&amp; r.route == newRoute) {
            return true
          }
          if (!r || !r.onExit || r.onExit(state) !== false) {
            stateStack.pop()
          }
          r = newRoute ? pushRoute(newRoute) : currentRoute()
          state.session.route = r.route
  
  
          return !r.onEnter || r.onEnter(state)
  
    }
  </code></pre>