Smush causing PHP Notice

When I activate Smush it causing the following PHP notice on the front-end of my site:

PHP Notice: Undefined index: rest_route in ***/wp-content/plugins/wp-smush-pro/core/modules/class-wp-smushit.php on line 1495