<p dir="auto"><code class="notranslate">/directions</code> javascript has an <code class="notranslate">awaitingGeocode</code> state variable, which is true when one of endpoints awaits geocoding results. But each endpoint has its own <code class="notranslate">awaitingGeocode</code> state variable too. Endpoint methods manipulate both global and their own state. Why do they need the global state? Only to decide if they need to run <code class="notranslate">getRoute()</code>. But <code class="notranslate">getRoute()</code> checks <code class="notranslate">awaitingGeocode</code> on endpoints anyway. There's no need for the global state.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4896'>https://github.com/openstreetmap/openstreetmap-website/pull/4896</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4896/commits/5944feb008005f67a09240d4b9ad1e2513f7633b" class="commit-link">5944feb</a> Remove global "awaiting geocode" routing state</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4896/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4896/files#diff-fdb9558c2ba79ddf9fbcb92594a8a8fa54abb1b3e25ce264de37951b428a958b">app/assets/javascripts/index/directions.js</a>
(10)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4896.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4896.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4896.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4896.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4896">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKF6E6EXYU3TYMJ4HLZHMKP7AVCNFSM6AAAAABJKUYYG2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TGNZQGQ2TOMQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPAEDDXMSPZP7DV6ULZHMKP7A5CNFSM6AAAAABJKUYYG2WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIYSVOPQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4896</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4896",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4896",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>