packages/theme-addresses/theme-addresses.js
function buildOptions (provinceNodeElement, provinces) {
  var defaultValue = provinceNodeElement.getAttribute('data-default');

  provinces.forEach(function (option) {
    var optionElement = document.createElement('option');
    optionElement.value = option[0];
    optionElement.textContent = option[1];

    provinceNodeElement.appendChild(optionElement);
  })

  if (defaultValue && getOption(provinceNodeElement, defaultValue)) {
    provinceNodeElement.value = defaultValue;
  }
}
function buildOptions (provinceNodeElement, provinces) {
  var defaultValue = provinceNodeElement.getAttribute('data-default');

  provinces.forEach(function (option) {
    var optionElement = document.createElement('option');
    optionElement.value = option[0];
    optionElement.textContent = option[1];

    provinceNodeElement.appendChild(optionElement);
  })

  if (defaultValue && getOption(provinceNodeElement, defaultValue)) {
    provinceNodeElement.value = defaultValue;
  }
}
function buildOptions ( provinceNodeElement , provinces ) { var defaultValue = provinceNodeElement . getAttribute ( 'data-default' ) ; provinces . forEach ( function ( option ) { var optionElement = document . createElement ( 'option' ) ; optionElement . value = option [ 0 ] ; optionElement . textContent = option [ 1 ] ; provinceNodeElement . appendChild ( optionElement ) ; } ) if ( defaultValue && getOption ( provinceNodeElement , defaultValue ) ) { provinceNodeElement . value = defaultValue ; } }
Builds the options for province selector
Builds the options for province selector