mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-07-07 01:29:26 -04:00
Fix crash on incomplete Adw.AlertDialog response
This commit is contained in:
parent
6bef9a39dd
commit
684ed7dc02
2 changed files with 6 additions and 2 deletions
|
@ -80,11 +80,14 @@ class ExtAdwResponseDialogResponse(AstNode):
|
|||
return not any(flag.flag == "disabled" for flag in self.flags)
|
||||
|
||||
@property
|
||||
def value(self) -> StringValue:
|
||||
def value(self) -> T.Optional[StringValue]:
|
||||
return self.children[0]
|
||||
|
||||
@property
|
||||
def document_symbol(self) -> DocumentSymbol:
|
||||
def document_symbol(self) -> T.Optional[DocumentSymbol]:
|
||||
if self.value is None:
|
||||
return None
|
||||
|
||||
return DocumentSymbol(
|
||||
self.id,
|
||||
SymbolKind.Field,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue