Sorry for the clunky title.
Currently, ApiEditPage specifies that
if ( $params['undo'] > 0 ) { // allow undo via api } elseif ( $contentHandler->supportsDirectApiEditing() === false ) { $this->dieWithError( [ 'apierror-no-direct-editing', $model, $name ] ); }
instead of having an empty if statement, the two conditions should just be merged. Patch to be uploaded shortly