Skip to content

Commit

Permalink
fix: avoid install installed plugin (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
allmoviestvshowslistsfilmography28 committed Nov 23, 2020
1 parent 2f1cba8 commit e19a1a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,12 @@ dayjs.prototype = proto;
})

dayjs.extend = (plugin, option) => {
if (plugin.installed) {
return dayjs
}

plugin(option, Dayjs, dayjs)
plugin.installed = true
return dayjs
}

Expand Down

0 comments on commit e19a1a6

Please sign in to comment.