Update tags.js

I have error "undefined is not a function" when I trying to add first tag. This commit fix this wrong behavior.
Merge pull request #124 from jmas/patch-1

Update tags.js