File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
packages/xforms-engine/src/lib/names Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 1
- import { UpsertableWeakMap } from '@getodk/common/lib/collections/UpsertableWeakMap.ts' ;
2
1
import type { XPathDOMAdapter } from '@getodk/xpath' ;
3
2
import { NamespaceURL } from './NamespaceURL.ts' ;
4
3
@@ -108,7 +107,6 @@ interface PrefixResolutionOptions {
108
107
*/
109
108
export class QualifiedName implements DeferredPrefixedQualifiedNameSource {
110
109
private readonly defaultPrefixResolutionOptions : PrefixResolutionOptions ;
111
- private readonly prefixedNameCache = new UpsertableWeakMap < PrefixResolutionOptions , string > ( ) ;
112
110
113
111
readonly namespaceURI : NamespaceURI ;
114
112
@@ -160,15 +158,13 @@ export class QualifiedName implements DeferredPrefixedQualifiedNameSource {
160
158
* in e.g. "debug/form design/dev mode" scenarios.
161
159
*/
162
160
getPrefixedName ( options : PrefixResolutionOptions = this . defaultPrefixResolutionOptions ) : string {
163
- return this . prefixedNameCache . upsert ( options , ( ) => {
164
- const { namespaceURI, localName } = this ;
165
- const prefix = options . lookupPrefix ( namespaceURI ) ;
161
+ const { namespaceURI, localName } = this ;
162
+ const prefix = options . lookupPrefix ( namespaceURI ) ;
166
163
167
- if ( prefix == null ) {
168
- return localName ;
169
- }
164
+ if ( prefix == null ) {
165
+ return localName ;
166
+ }
170
167
171
- return `${ prefix } :${ localName } ` ;
172
- } ) ;
168
+ return `${ prefix } :${ localName } ` ;
173
169
}
174
170
}
You can’t perform that action at this time.
0 commit comments