Checks whether the current metadata state has the given metadata key.
(key: MetadataKey<any, any, any>)
| 81 | |
| 82 | /** Checks whether the current metadata state has the given metadata key. */ |
| 83 | has(key: MetadataKey<any, any, any>): boolean { |
| 84 | // Metadata keys get added to the map lazily, on first access, |
| 85 | // so we can't rely on checking presence in the metadata map. |
| 86 | // Instead we check if there is any logic for the given metadata key. |
| 87 | return this.node.logicNode.logic.hasMetadata(key); |
| 88 | } |
| 89 | } |