# BibLaTeX: Suppress comma after editor names

I am trying to get my bibliography to my needs, and there is one comma which I don't know how to remove.

In entry [2] ('inbook') it is correct, but in entry [1] ('book' without author, just editor) there shouldn't be the comma.

It is really difficult for me to understand all the biblatex commands, so it would be great if someone could help me with this issue.

My minimal working example:

\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\usepackage[backend=biber,style=authoryear]{biblatex}
\usepackage{csquotes}
\usepackage{filecontents}

\begin{filecontents*}{bib.bib}
@book{awv_stmk,
editor = "{Hans Wurst}",
title = "{Das Leben}"
}

@inbook{book2,
author = "Hans Wurst",
booktitle = "Das Leben",
editor = "Biene Maja",
title = "Artikel"
}
\end{filecontents*}

% Put editor string in parentheses
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}

% Like editor+others but without comma before editor string and dash checks
\newbibmacro*{ineditor+others}{%
\ifboolexpr{ test \ifuseeditor and not test {\ifnameundef{editor}} }
{\printnames{editor}%
\clearname{editor}}
{}}

% Print editors before "in" title
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}%
\usebibmacro{ineditor+others}%
\newunit
\clearname{editor}}

\begin{document}

\nocite{*}
\printbibliography

\end{document}

Edit: For authoryear style, you modify the bbx:editor macro to put in a space instead of a comma and space. Try adding this:

\usepackage{xpatch}
\xpatchbibmacro{bbx:editor}