fix: use a new way to manage clean_handler#7648
Conversation
Signed-off-by: spacewander <[email protected]>
| end | ||
|
|
||
| local id = item.clean_handlers._id | ||
| item.clean_handlers._id = item.clean_handlers._id + 1 |
There was a problem hiding this comment.
If item.clean_handlers._id is nil. The result will be two because we set item.clean_handlers._id = 1 at line 62.
There was a problem hiding this comment.
What is the clean_handlers._id used for?
There was a problem hiding this comment.
What is the
clean_handlers._idused for?
It is used to provide id for the handlers.
There was a problem hiding this comment.
If
item.clean_handlers._idis nil. The result will be two because we setitem.clean_handlers._id = 1at line 62.
Yes. But we store the id (which is assigned before item.clean_handlers._id = item.clean_handlers._id + 1), so the first id is still 1.
There was a problem hiding this comment.
If
item.clean_handlers._idis nil. The result will be two because we setitem.clean_handlers._id = 1at line 62.Yes. But we store the id (which is assigned before
item.clean_handlers._id = item.clean_handlers._id + 1), so the first id is still 1.
Got it.
| end | ||
|
|
||
| local id = item.clean_handlers._id | ||
| item.clean_handlers._id = item.clean_handlers._id + 1 |
There was a problem hiding this comment.
If
item.clean_handlers._idis nil. The result will be two because we setitem.clean_handlers._id = 1at line 62.Yes. But we store the id (which is assigned before
item.clean_handlers._id = item.clean_handlers._id + 1), so the first id is still 1.
Got it.
Signed-off-by: spacewander [email protected]
Description
Fixes #7633
Checklist