function getDisplayIndex(displayList) {
  let displayIndex = 0;

  try {
    displayIndex = parseInt(assistantConfig['displayPreference']) - 1;

    if (displayIndex > displayList.length - 1 || displayIndex < 0) {
      debugLog(`Resetting Display Preference: ${displayIndex + 1} -> 1`);
      displayIndex = 0;
    }
    else {
      displayIndex = 0;
    }
  }
  catch {
    displayIndex = 0;
  }

  return displayIndex;
}
Returns display index based on `assistantConfig.displayPreference`.
If the value of `displayPreference` is invalid or is unavailable,
a default value is returned.

@param {Electron.Display[]} displayList
The list of all available displays.