[NTP] Fix reordering when an add button is present and not at max shortcuts
Attempting to convert an non-existent 'index' attribute to a number returns 0. Since 'index' is not set on the add button, this will cause it to be moved in a weird direction. Ignore the add button when shifting tiles, and throw an error if no index is found. Screencast: https://drive.google.com/open?id=1zDpvi34Ng4kte8vHYcKCPne0OEmfRctf Bug: 961200 Change-Id: I78bf0b803ad6cc90b3913a3ca382b891320c95b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1601647Reviewed-by:Kyle Milka <kmilka@chromium.org> Commit-Queue: Kristi Park <kristipark@chromium.org> Cr-Commit-Position: refs/heads/master@{#658293}
Showing
Please register or sign in to comment