mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: combine splice-and-push into just splice
This commit is contained in:
@@ -192,8 +192,7 @@ export class DOMEvent implements Event {
|
|||||||
* [Button, StackLayout, Page] // 'bubble'
|
* [Button, StackLayout, Page] // 'bubble'
|
||||||
*/
|
*/
|
||||||
private getEventPath(responder: Observable, path: 'capture' | 'bubble'): Observable[] {
|
private getEventPath(responder: Observable, path: 'capture' | 'bubble'): Observable[] {
|
||||||
recycledEventPath.splice(0, recycledEventPath.length);
|
recycledEventPath.splice(0, recycledEventPath.length, responder);
|
||||||
recycledEventPath.push(responder);
|
|
||||||
|
|
||||||
if (!responder.isViewBase()) {
|
if (!responder.isViewBase()) {
|
||||||
return recycledEventPath;
|
return recycledEventPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user