Widget: Avoid adding extra spaces to the result of this._classes(...)

This is a PR on top of a PR (#1369).
Let's use the simple check and a short comment like this:

```js
// Avoid adding extra spaces from empty parts
if ( classes[ parts[ i ] ] ) {
```