Commit 6e509ae3 authored by Luke Bennett's avatar Luke Bennett Committed by Z.J. van de Weg

Added safety check for formatted values

parent 35e2315a
......@@ -204,8 +204,8 @@
const environment = environments[i];
if ($(`.mr-state-widget #${ environment.id }`).length) return;
const $template = $(DEPLOYMENT_TEMPLATE);
if (!environment.external_url) $('.js-environment-link', $template).remove();
if (environment.deployed_at) {
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (environment.deployed_at && environment.deployed_at_formatted) {
environment.deployed_at = $.timeago(environment.deployed_at) + '.';
} else {
$('.js-environment-timeago', $template).remove();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment