Flash message does not disappear in frontend from

I have a frontend form in a component like this:

{{ form_ajax('onCreateEntry', { novalidate: 1, 'data-request-flash': 1, class: 'form-elements form-horizontal', role: 'form' }) }}

    <div class="form-group text-field span-left">
        <label for="name">Name</label>
        <input type="text" id="name" name="name" class="form-control" />
    </div>

{{ form_close() }}

In the component class I valide like this:

$data = \Input::post();

$rules = [
    'name' => 'required|string',
];

$validation = \Validator::make($data, $rules);
if ($validation->fails()) {
    throw new \ValidationException($validation);
}

I throws a perfect flash message, but the flash doesn’t disappear again.

I included the frameworks extras in my layout above the closing body like this:

{% framework extras %}

The flash message should disappear after a few seconds, or you can close it with the X.

I checked the JS in: /modules/system/assets/js/framework-extras.js

And I don’t get these three lines (309 - 311):

if (type !== 'error') {
    timer = window.setTimeout(remove, interval * 1000);
} // Remove logic

Should it be like that, that an error message doesn’t disappear automatically?

When I set the class to success or info, the flash disappears after some seconds.

UPDATE:
Could we change the code in something like this?

if (interval && interval !== 0) {
        timer = window.setTimeout(remove, interval * 1000);
} // Remove logic

Then we would have control over disappearing or not.

Would it help, if I’d make a PR?