Commit 4ec802020cf8bf47c4f4783a51eaca9230c8586b

Authored by Adhidarma Hadiwinoto
1 parent aa77cc76e0
Exists in master

verbose sorting

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

... ... @@ -88,8 +88,12 @@ function submitConfigEdit(req, res) {
88 88  
89 89 } else if (req.scope == 'globals' && req.keyword == 'products' && req.body.newValue.trim()) {
90 90 var products = req.body.newValue.split(',');
91   - products = aaa.sortProductsArray(products);
92   - req.body.newValue = products.join(',');
  91 + var sortedProducts = products = aaa.sortProductsArray(products);
  92 + req.body.newValue = sortedProducts.join(',');
  93 + console.log('Unsorted products:');
  94 + console.log(products);
  95 + console.log('Sorted products:');
  96 + console.log(sortedProducts);
93 97 }
94 98  
95 99 if (config[req.body.scope][req.body.keyword] != req.body.newValue.trim()) {