title: Cannot find name `data`, but it's defined
body: <p>I have the following error: &quot;Cannot find name 'data'.&quot;, but I <em>have</em> defined it.</p>
  <pre><code>const initialState = () =&gt; {
    try {
      const data = window.localStorage.getItem('auth');
    } catch (e) {
      const data = null;
    }
  
    if (!data) {
      return {
        matrixIsAuthenticated: false,
        matrixUserId: null,
        matrixAccessToken: null,
      };
    } else {
      return data;
    }
  };
  </code></pre>