Skip to content

Commit d9db439

Browse files
cyrilffzankl
authored andcommitted
Allow the config key to be camelCase (#6)
Today to configure this plugin, we need to set the key `"flexible-alert"` as a string. It works and everything is fine but I prefer to use a `camelCased` key This PR allows both config key to be valid.
1 parent 3a4b718 commit d9db439

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import styles from './style.css';
4545
}
4646

4747
const install = function (hook, vm) {
48-
const options = mergeObjects(CONFIG, vm.config['flexible-alerts']);
48+
const options = mergeObjects(CONFIG, vm.config['flexible-alerts'] || vm.config.flexibleAlerts);
4949

5050
const findSetting = function findAlertSetting(input, key, fallback, callback) {
5151
const match = (input || '').match(new RegExp(`${key}:(([\\s\\w\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]*))`));

0 commit comments

Comments
 (0)