mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Merge pull request #1603 from fxOne/master
fixing `findOne` result type
This commit is contained in:
commit
6abd79c861
@ -220,7 +220,7 @@ export abstract class Container<
|
||||
* return node.getType() === 'Shape'
|
||||
* })
|
||||
*/
|
||||
findOne<ChildNode extends Node = Node>(selector: string | Function) {
|
||||
findOne<ChildNode extends Node = Node>(selector: string | Function): ChildNode | undefined {
|
||||
var result = this._generalFind<ChildNode>(selector, true);
|
||||
return result.length > 0 ? result[0] : undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user