Skip to content
This repository was archived by the owner on Oct 13, 2018. It is now read-only.

Commit

Permalink
fix(sync-options): always show 'codeSync' option so that it's clear w…
Browse files Browse the repository at this point in the history
…hen it's being enabled/disabled

- fixes BrowserSync/browser-sync#931, BrowserSync/browser-sync#802
  • Loading branch information
shakyShane committed Apr 10, 2016
1 parent f49516e commit eb9d5b3
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions lib/plugins/sync-options/sync-options.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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) {
Expand Down

0 comments on commit eb9d5b3

Please # to comment.