migrated from https://github.com/component/component/issues/398
migrated from componentjs/component#398