mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 04:46:57 -04:00
allow array syntax inside of the messageKey property of a config item
This commit is contained in:
+3
-1
@@ -172,7 +172,9 @@ module.exports.messageKeysExpected = function(expected) {
|
||||
Object.keys(expected).forEach(function(key) {
|
||||
var expectedVal = Array.isArray(expected[key]) ? expected[key] : [expected[key]];
|
||||
expectedVal.forEach(function(val, index) {
|
||||
result[messageKeys[key] + index] = val;
|
||||
if (typeof val !== 'undefined') {
|
||||
result[messageKeys[key] + index] = val;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user