Skip to content

Commit

Permalink
fix:options is not defined when call emit
Browse files Browse the repository at this point in the history
  • Loading branch information
YuChenLi923 committed Apr 12, 2019
1 parent 4d9e4a3 commit 8b376b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@
emit: function () {
var args = toArray(arguments),
event = args.shift(),
options = this.options,
scope = options.scope != null ? options.scope : null;
if (this.promise && this.resolve && (event === 'success' || event === 'fail')) {
this.resolve.call(scope, args[0]);
Expand Down

0 comments on commit 8b376b4

Please sign in to comment.