Error when trying to edit an existing geo entity in an entity browser
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3390087. -->
Reported by: [andybroomfield](https://www.drupal.org/user/636756)
Related to !5
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>This was encountered during the upgrade to the Localgov Drupal distribution which now uses Geo entity, but I belive will effect all instances that use the Geo entitiy browser.</p>
<p>Once a geo is selected, it is not possible to edit that geo on the node it is embeded.<br>
Instead a error "Please see the console" which shows the ajax error, and the logs show.</p>
<blockquote><p>Error: [] operator not supported for strings in Drupal\entity_browser\Controllers\EntityBrowserController->entityBrowserEdit() (line 75 of /app/web/modules/contrib/entity_browser/src/Controllers/EntityBrowserController.php).</p></blockquote>
<p>Looking at .module geo_entity is attempting to a JS library as just a string and not part of an array.<br>
<code>$complete_form['#attached']['library'] = 'geo_entity/geocode-geofield';</code><br>
Changing that to an array solves the issue.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Add an geo entity reference to a node and use the geo entitiy browser widget.<br>
Add a geo to a node and save.<br>
Edit the node and try to edit the geo.</p>
issue