Skip to content

Commit 937ad84

Browse files
committed
hotfix: use exists in hasFactor/hasVariable
1 parent 3115e1a commit 937ad84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/AbstractDFG.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ Return boolean whether a factor `label` is present in `<:AbstractDFG`.
449449
"""
450450
function hasFactor(dfg::G, label::Symbol)::Bool where {G <: AbstractDFG}
451451
@warn "hasFactor() deprecated, please use exists()"
452-
return haskey(dfg.labelDict, label)
452+
return exists(dfg, label)
453453
end
454454

455455
"""
@@ -459,7 +459,7 @@ Return `::Bool` on whether `dfg` contains the variable `lbl::Symbol`.
459459
"""
460460
function hasVariable(dfg::G, label::Symbol)::Bool where {G <: AbstractDFG}
461461
@warn "hasVariable() deprecated, please use exists()"
462-
return haskey(dfg.labelDict, label) # haskey(vertices(dfg.g), label)
462+
return exists(dfg, label) # haskey(vertices(dfg.g), label)
463463
end
464464

465465

0 commit comments

Comments
 (0)