From 7ecaf6295daf8759aa98d00e7035c4dc0f853303 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 31 Jul 2023 16:49:27 +0100 Subject: [PATCH] DEV: Correctly strip sourcemap URL from splash-screen js (#22879) In e1d27400f5d8be345383b52bd118e652724a517e we started running the splash-screen JS through terser, which removed the trailing newline from the `sourceMappingURL` line. Adding a reliable end-to-end test for this isn't possible because our testing environment doesn't use terser. --- app/helpers/splash_screen_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/splash_screen_helper.rb b/app/helpers/splash_screen_helper.rb index af2ec3824d4..275c5452acd 100644 --- a/app/helpers/splash_screen_helper.rb +++ b/app/helpers/splash_screen_helper.rb @@ -19,7 +19,7 @@ module SplashScreenHelper def self.load_js File.read("#{Rails.root}/app/assets/javascripts/discourse/dist/assets/splash-screen.js").sub( - "//# sourceMappingURL=splash-screen.map\n", + "//# sourceMappingURL=splash-screen.map", "", ) rescue Errno::ENOENT