Promise.resolve().then(() => {
            if (typeof getState === `function`) {
                return getState(localInstance);
            }
        }).then((result) => {