Cannot read property 'sharing' of undefined