From c74a5771fdc8617cf0b95055f5664b0d73da4bf2 Mon Sep 17 00:00:00 2001 From: Thomas Ferracin Date: Thu, 24 Nov 2016 18:01:08 +0100 Subject: [PATCH] FIX uploadLocation when window.location.port is empty More information available: https://meta.discourse.org/t/uploaded-video-are-not-embedded-and-display-a-link/53346 --- app/assets/javascripts/discourse/lib/utilities.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/utilities.js.es6 b/app/assets/javascripts/discourse/lib/utilities.js.es6 index 0385fa65550..ee160fb6fed 100644 --- a/app/assets/javascripts/discourse/lib/utilities.js.es6 +++ b/app/assets/javascripts/discourse/lib/utilities.js.es6 @@ -244,7 +244,7 @@ export function uploadLocation(url) { } else { var protocol = window.location.protocol + '//', hostname = window.location.hostname, - port = ':' + window.location.port; + port = window.location.port ? ':' + window.location.port : ''; return protocol + hostname + port + url; } }