Gutenberg: How to update associated Terms of Custom Taxonomy to Current Post

I found it (Argh!).

I was nearly there, but I made a stupid mistake. Inside the update-function, the argument t is not an object, but the value itself:

const update = ( t ) => {
    // t is the selected term's ID as a string. Transform it to an integer
    const x = parseInt( t, 10 );
    // Update the assigned term or remove it, when zero        
    editEntityRecord( 'postType', 'my_custom_post_type', post.id, { 
        my_custom_taxonomy: x ? [ x ] : [] 
    } );
    
    // ... 
}