Commit 333bf512180a7b137562cfaa2b658483681c61d3

Authored by Adhidarma Hadiwinoto
1 parent 4cdaea2ef4
Exists in master

must_have_pattern_flags

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

... ... @@ -46,10 +46,8 @@ function getMultiStockBalance(msg) {
46 46 if (!config || !config.sms_parser || !config.sms_parser.stock || !config.sms_parser.stock.multistock) return;
47 47  
48 48 if (config.sms_parser.stock.multistock.must_have_pattern) {
49   - const re = new RegExp(config.sms_parser.stock.multistock.must_have_pattern)
50   - if (msg.search(re) < 0) {
51   - return;
52   - }
  49 + const re = new RegExp(config.sms_parser.stock.multistock.must_have_pattern, config.sms_parser.stock.multistock.must_have_pattern_flags);
  50 + if (msg.search(re) < 0) { return; }
53 51 }
54 52  
55 53 const re = new RegExp(config.sms_parser.stock.multistock.pattern, config.sms_parser.stock.multistock.flags);