WeakAuras

WeakAuras

206M Downloads

WeakAuras.Import checks type against nil instead of 'nil'

Snakybo opened this issue ยท 0 comments

commented

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

  1. Add a print statement at the end of the Import function, or at the place where .Import is being called logging the status and message.
  2. Open the aura import popup
  3. Enter a valid import string
  4. See the import info popup appear and a message in the chat frame with false "Invalid update target. Importing as an unknown payload."

Screenshots
image (5)

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