This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit cbf334c4a01b1432ae09b091123e2cba346e0bd0
Author: Sam Ruby <[email protected]>
AuthorDate: Tue Jan 23 14:40:57 2018 -0500

    force es5 for visitors using browsers that don't support service workers
---
 www/board/agenda/views/main.html.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/www/board/agenda/views/main.html.rb 
b/www/board/agenda/views/main.html.rb
index cec3b8f..600ccce 100644
--- a/www/board/agenda/views/main.html.rb
+++ b/www/board/agenda/views/main.html.rb
@@ -10,7 +10,12 @@ _html do
 
   _div_.main!
 
-  _script src: "../app.js?#{@appmtime}", lang: 'text/javascript'
+  # force es5 for non-test visitors.  Visitors using browsers that support
+  # ServiceWorkers will receive es2017 versions of the script via
+  # views/bootstrap.html.erb.
+  app = (ENV['RACK_ENV'] == 'test' ? 'app' : 'app-es5')
+  _script src: "../#{app}.js?#{@appmtime}", lang: 'text/javascript'
+
   _.render '#main' do
     _Main server: @server, page: @page
   end

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to