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
ibufu authored Nov 23, 2020
1 parent 34cfb92 commit a92eb6c
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 a92eb6c

Please sign in to comment.