View Single Post
05/11/19, 03:04 PM   #28
Kyoma
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 125
You don't actually need the assert/debug line to see if the library isn't loaded because you are already using ##DependsOn and users need to install it seperately anyway. Even if the LAM instance that is loaded comes from an (older) addon that had it embedded (with its manifest) it still loads with LibStub through that.

I agree you'd still need this (taking LibPotionBuff as an example):
Code:
    local lpb = LibPotionBuff
    if lpb == nil and LibStub then lpb = LibStub("LibPotionBuff") end
Instead of this tho
Code:
    local lpb =  LibStub("LibPotionBuff")
But that is mainly because the user might have a LAM version installed that still used LibStub because this is kind of a transition period.
  Reply With Quote