From ca2aca19c5500cd6b55f90a8792ba13a4c064ae4 Mon Sep 17 00:00:00 2001
From: toasted-nutbread <toasted-nutbread@users.noreply.github.com>
Date: Sun, 15 Dec 2019 00:07:54 -0500
Subject: Upgrade default fieldTemplates to null

---
 ext/bg/js/options.js | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'ext')

diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 7f540a70..1650cea9 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -86,6 +86,13 @@ const profileOptionsVersionUpdates = [
         delete options.general.audioSource;
         delete options.general.audioVolume;
         delete options.general.autoPlayAudio;
+    },
+    (options) => {
+        // Version 12 changes:
+        //  The preferred default value of options.anki.fieldTemplates has been changed to null.
+        if (utilStringHashCode(options.anki.fieldTemplates) === 1444379824) {
+            options.anki.fieldTemplates = null;
+        }
     }
 ];
 
-- 
cgit v1.2.3