We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2220d88 commit bdab52dCopy full SHA for bdab52d
lib/XMLNode.js
@@ -146,17 +146,9 @@ const XMLNode = class extends SAXEvent {
146
147
get text () {
148
149
- let s = super.text
150
-
151
- if (this [TYPE] === SAXEvent.TYPES.CHARACTERS) {
+ const s = super.text; if (this [TYPE] !== SAXEvent.TYPES.CHARACTERS) return s
152
153
- const entityResolver = this [ENTITY_RESOLVER]
154
155
- if (entityResolver) return entityResolver.fix (s)
156
157
- }
158
159
- return s
+ const entityResolver = this [ENTITY_RESOLVER]; return entityResolver ? entityResolver.fix (s) : s
160
161
}
162
0 commit comments