From 708fd640f7af9a641a5b3a66dacbb17392e8410c Mon Sep 17 00:00:00 2001
From: Matthew Hodgson <matthew@matrix.org>
Date: Wed, 18 Jan 2017 14:06:20 +0000
Subject: [PATCH] unbreak switching after vdh's webpack changes

---
 src/vector/index.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/vector/index.html b/src/vector/index.html
index 1895cc6b..a6c3092d 100644
--- a/src/vector/index.html
+++ b/src/vector/index.html
@@ -22,9 +22,11 @@
     <meta name="theme-color" content="#ffffff">
     <% for (var i=0; i < htmlWebpackPlugin.files.css.length; i++) {
         var file = htmlWebpackPlugin.files.css[i];
-        if (file.match(/^theme-(?!light\.)/)) {
+        var match = file.match(/^bundles\/.*?\/theme-((?!light\.).*)\.css$/);
+        if (match) {
+            var title = match[1].charAt(0).toUpperCase() + match[1].slice(1);
         %>
-           <link rel="alternate stylesheet" title="<%= file %>" href="<%= file %>">
+           <link rel="alternate stylesheet" title="<%= title  %>" href="<%= file %>">
         <% } else { %>
            <link rel="stylesheet" href="<%= file %>">
         <% }