changeset b028a776dcda in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=b028a776dcda
description:
        Ensure inserted record has a valid position

        issue9731
        review298881002
diffstat:

 src/model.js |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 2efc45374223 -r b028a776dcda src/model.js
--- a/src/model.js      Wed Oct 21 23:28:09 2020 +0200
+++ b/src/model.js      Sat Oct 24 13:12:01 2020 +0200
@@ -146,6 +146,7 @@
             if ((position === undefined) || (position == -1)) {
                 position = this.length;
             }
+            position = Math.min(position, this.length);
             if (changed === undefined) {
                 changed = true;
             }

Reply via email to