alanning / roles-npm

A user authorization library, integrates with MongoDB back-end, ported from Meteor accounts.
MIT License
7 stars 1 forks source link

readme: fix import Roles example at Usage topic #1

Closed KnupMan closed 6 years ago

KnupMan commented 7 years ago

I was trying to use @alanning/roles package due to the example in readme. So I have got an error TypeError: _context.t0 is not a constructor, which mean Roles class is undefined, so it's not working with the default import. The problem was fixed, after I import directly Roles from @alanning/roles package:

import { Roles } from '@alanning/roles';

The purpose of the change is to avoid confusions between examples and real usage.

ghost commented 6 years ago

Thanks. :-)