fix(predictive-back-gesture): create attribute, if it does not exist

This commit is contained in:
oSumAtrIX 2022-12-14 00:32:25 +01:00
parent c76cd0d5a6
commit c00e771705
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -19,11 +19,12 @@ class PredictiveBackGesturePatch : ResourcePatch {
val document = editor.file val document = editor.file
with(document.getElementsByTagName("application").item(0)) { with(document.getElementsByTagName("application").item(0)) {
attributes.getNamedItem(FLAG)?.let { if (attributes.getNamedItem(FLAG) != null) return@with
document.createAttribute(FLAG) document.createAttribute(FLAG)
.apply { value = "true" } .apply { value = "true" }
.let(attributes::setNamedItem) .let(attributes::setNamedItem)
}
} }
} }