WeakAuras.Import checks type against nil instead of 'nil'
Snakybo opened this issue ยท 0 comments
Describe the bug
The WeakAuras.Import
API call has the following check:
if type(target) ~= nil then
This is always true
, even when the optional target
parameter has not been specified or is nil
. This causes the .Import
call to always return false, "Invalid update target. Importing as an unknown payload."
even when the import is successful.
The fix for this is simply changing the above check to:
if type(target) ~= 'nil' then
To Reproduce
- Add a
print
statement at the end of theImport
function, or at the place where.Import
is being called logging the status and message. - Open the aura import popup
- Enter a valid import string
- See the import info popup appear and a message in the chat frame with
false
"Invalid update target. Importing as an unknown payload."
Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?
Yes
Which version of WeakAuras are you using?
3.1.9
Are you on World of Warcraft Classic or Retail?
- Classic
- Retail
Was it working in a previous version? If yes, which was the last good one?
Looks like it's been broken for at least two years: b831e88