From f226bdb251905a67a237e788e4703bff1c5f9a28 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Mon, 6 Feb 2017 15:23:47 +0300 Subject: [PATCH] fix --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c519033..af796e6 100644 --- a/index.js +++ b/index.js @@ -259,7 +259,7 @@ io.on('connection', function(socket) if(orderBy && orderBy.length > 0) { const orderDesc = navigation.orderDesc ? 'DESC' : 'ASC'; - args.unshift(orderBy); + args.splice(1, 0, orderBy); order = 'ORDER BY ?? ' + orderDesc; } @@ -299,7 +299,7 @@ io.on('connection', function(socket) if(orderBy && orderBy.length > 0) { const orderDesc = navigation.orderDesc ? 'DESC' : 'ASC'; - args.unshift(orderBy); + args.splice(1, 0, orderBy); order = 'ORDER BY ?? ' + orderDesc; }