Open ng-gist opened 5 years ago
Indeed you seem to have the solution for this problem. Please go ahead and make a PR to get the credit for your work.
Solution above was just remedying the symptoms but I found the disease. I will create a PR in a bit. Actual cause was createRewardsTab function was getting called twice, once from base file and once from rawards file when #reward was present in the url. I added another check to prevent creation of reward tab again. This should also increase the performance for the rewards tab.
Expected behavior
On busy.org platform, clicking on Pending under SteemPlus -> Rewards -> Curation should show only Paid option.
Actual behavior
Clicking on Pending under SteemPlus -> Rewards -> Curation throws undefined error in console and both Pending and Paid links are displayed with none selected.
How to reproduce
Technical Analysis and Solution
When Curation Rewards tab is clicked, following code executes:
This code is supposed to get 2 items (Pending and Paid) and then remove Pending and select Paid. But following the steps above, $('.subtypeItem') gets 4 items. There is another set of Pending and Paid tabs in code somewhere. To solve this issue, you can remove all DOM elements except last 2.
To remove elements: