From eb9d5b3ddb47a02ba92f40fdcb1ffcb450808027 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Sun, 10 Apr 2016 19:50:43 +0100 Subject: [PATCH] fix(sync-options): always show 'codeSync' option so that it's clear when it's being enabled/disabled - fixes https://github.com/BrowserSync/browser-sync/issues/931, https://github.com/BrowserSync/browser-sync/issues/802 --- lib/plugins/sync-options/sync-options.client.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/plugins/sync-options/sync-options.client.js b/lib/plugins/sync-options/sync-options.client.js index 8811725..96a807c 100644 --- a/lib/plugins/sync-options/sync-options.client.js +++ b/lib/plugins/sync-options/sync-options.client.js @@ -60,13 +60,11 @@ "ghostMode.submit": "Form Submissions will be synced", "ghostMode.inputs": "Text inputs (including text-areas) will be synced", "ghostMode.toggles": "Radio + Checkboxes changes will be synced", - codeSync: "Reload the browser or inject CSS when watched files change" + codeSync: "Reload or Inject files they change" }; // If watching files, add the code-sync toggle - if (hasWatchers(ctrl.options.files)) { - ctrl.syncItems.push(addItem("codeSync", ["codeSync"], ctrl.options.codeSync, taglines["codeSync"])); - } + ctrl.syncItems.push(addItem("codeSync", ["codeSync"], ctrl.options.codeSync, taglines["codeSync"])); Object.keys(ctrl.options.ghostMode).forEach(function (item) { if (item !== "forms" && item !== "location") { @@ -87,15 +85,6 @@ tagline: tagline }; } - - function hasWatchers (files) { - if (!files) { - return false; - } - return Object.keys(files).some(function (key) { - return files[key].length; - }); - } } function ucfirst (string) {