Added check to catch event stops without matching starts

Fixes #7
This commit is contained in:
Andrey Savchenko committed 2015-08-12 00:14:33 +03:00
1 parent a3572063d2
commit 32f300af7f
1 file changed
+4
+4
View File
@@ -102,6 +102,10 @@ class Laps {
) )
); );
if ( 'stop' === $event['action'] && ! self::$stopwatch->isStarted( $event['event'] ) ) {
return $input;
}
self::$stopwatch->$event['action']( $event['event'], $event['category'] ); self::$stopwatch->$event['action']( $event['event'], $event['category'] );
return $input; return $input;