mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
LanguageServers: Allow set_declarations_of_document callback to be null
This commit is contained in:
parent
545b6af305
commit
e9fc5d6cc3
Notes:
sideshowbarker
2024-07-18 18:10:05 +09:00
Author: https://github.com/itamar8910
Commit: e9fc5d6cc3
Pull-request: https://github.com/SerenityOS/serenity/pull/7095
Reviewed-by: https://github.com/awesomekling
1 changed files with 2 additions and 1 deletions
|
@ -19,7 +19,8 @@ AutoCompleteEngine::~AutoCompleteEngine()
|
|||
}
|
||||
void AutoCompleteEngine::set_declarations_of_document(const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations)
|
||||
{
|
||||
VERIFY(set_declarations_of_document_callback);
|
||||
if (!set_declarations_of_document_callback)
|
||||
return;
|
||||
|
||||
// Optimization - Only notify callback if declarations have changed
|
||||
if (auto previous_declarations = m_all_declarations.get(filename); previous_declarations.has_value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue