REFACTOR: simpler version check

REFACTOR: simpler version check

diff --git a/assets/javascripts/initializers/extend-for-policy.js.es6 b/assets/javascripts/initializers/extend-for-policy.js.es6
index 79da177..c91e403 100644
--- a/assets/javascripts/initializers/extend-for-policy.js.es6
+++ b/assets/javascripts/initializers/extend-for-policy.js.es6
@@ -277,7 +277,7 @@ function initializePolicy(api) {
       }
     });
 
-    if (!policyString.match(/version/gm)) {
+    if (policyString.indexOf("version=") < 0) {
       policyString = `${policyString} version="1"`;
     }

GitHub sha: 2a6ecc1e

1 Like