* Display an error message if conflicting options are used together in this. * * @private
()
| 1704 | * @private |
| 1705 | */ |
| 1706 | _checkForConflictingLocalOptions() { |
| 1707 | const definedNonDefaultOptions = this.options.filter((option) => { |
| 1708 | const optionKey = option.attributeName(); |
| 1709 | if (this.getOptionValue(optionKey) === undefined) { |
| 1710 | return false; |
| 1711 | } |
| 1712 | return this.getOptionValueSource(optionKey) !== 'default'; |
| 1713 | }); |
| 1714 | |
| 1715 | const optionsWithConflicting = definedNonDefaultOptions.filter( |
| 1716 | (option) => option.conflictsWith.length > 0, |
| 1717 | ); |
| 1718 | |
| 1719 | optionsWithConflicting.forEach((option) => { |
| 1720 | const conflictingAndDefined = definedNonDefaultOptions.find((defined) => |
| 1721 | option.conflictsWith.includes(defined.attributeName()), |
| 1722 | ); |
| 1723 | if (conflictingAndDefined) { |
| 1724 | this._conflictingOption(option, conflictingAndDefined); |
| 1725 | } |
| 1726 | }); |
| 1727 | } |
| 1728 | |
| 1729 | /** |
| 1730 | * Display an error message if conflicting options are used together. |
no test coverage detected