Page MenuHomePhabricator

Check for location in IPInfo widget before appending paragraph
Closed, ResolvedPublic

Description

Following T268531: Check if `asn` value exists before attempting to display it in IPInfo, the HTML inside the IPInfo popup is something like this, when there is no ASN:

<p class="ext-ipinfo-widget-location">Saint Paul, Minnesota</p>
<p class="ext-ipinfo-widget-source">Source: GeoIp2</p>

However, when there are no locations there is an empty paragraph instead:

<p class="ext-ipinfo-widget-location"></p>
<p class="ext-ipinfo-widget-asn">UMN-SYSTEM</p>
<p class="ext-ipinfo-widget-source">Source: GeoIp2</p>

We shouldn't append the .ext-ipinfo-widget-location paragraph if there are no locations.

Event Timeline

Change 643507 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/IPInfo@master] Don't append empty paragraph in widget if location is unavailable

https://gerrit.wikimedia.org/r/643507

Change 643507 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Don't append empty paragraph in widget if location is unavailable

https://gerrit.wikimedia.org/r/643507