<!DOCTYPE html>
<html>
  <head>
    <title>fastlane CI</title>
    <link rel="stylesheet" href="/material.min.css">
    <script src="/material.min.js"></script>
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
  <body>
    <!-- 
    <%= erb :"../../partials/notification_banner" %> 
    -->
    <%= yield %>
  </body>
</html>

<!-- Modal display script -->
<script>
  var dialog = document.querySelector('dialog');
  if (! dialog.showModal) dialogPolyfill.registerDialog(dialog);

  <% if message %>
    dialog.showModal();
  <% end %>

  dialog.querySelector('.close').addEventListener('click', function() {
    dialog.close();
  });
</script>

<!DOCTYPE html>
<html>
  <head>
    <title>fastlane CI</title>
    <link rel="stylesheet" href="/material.min.css">
    <script src="/material.min.js"></script>
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
  <body>
    <!-- 
    <%= erb :"../../partials/notification_banner" %> 
    -->
    <%= yield %>
  </body>
</html>

<!-- Modal display script -->
<script>
  var dialog = document.querySelector('dialog');
  if (dialog) {
    if (!dialog.showModal) dialogPolyfill.registerDialog(dialog);

    <% if message %>
      dialog.showModal();
    <% end %>

    dialog.querySelector('.close').addEventListener('click', function() {
      dialog.close();
    });
  }
</script>

Fix JavaScript error of undefined `dialog` variable
Fix JavaScript error of undefined `dialog` variable

Fixes https://github.com/fastlane/ci/issues/507