steventhorne / legendhub

Source code for the legendhub website.
https://www.legendhub.org
MIT License
3 stars 3 forks source link

Item locking doesn't work as intended #153

Closed Ner-f closed 1 year ago

Ner-f commented 1 year ago

When loading a locked item from string it will not delete the period character properly causing an item index mismatch.

Expected Behavior

The locked item indicator should be deleted when loading the list from a string.

Current Behavior

Currently, the character doesn't get deleted.

Possible Solution

if (listStr[0] === '.') {
    isLocked = true;
    listStr.substr(1);
}

The substring line needs to be changed to: listStr = listStr.substring(1);

Steps to Reproduce (for bugs)

  1. Lock any item(s) in a list
  2. Reload the page

Context

Your Environment