Checks whether the current metadata state has the given metadata key.
(key: MetadataKey<any, any, any>)
| 73 | |
| 74 | /** Checks whether the current metadata state has the given metadata key. */ |
| 75 | has(key: MetadataKey<any, any, any>): boolean { |
| 76 | // Metadata keys get added to the map lazily, on first access, |
| 77 | // so we can't rely on checking presence in the metadata map. |
| 78 | // Instead we check if there is any logic for the given metadata key. |
| 79 | return this.node.logicNode.logic.hasMetadata(key); |
| 80 | } |
| 81 | } |