Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchristian committed Sep 23, 2016
2 parents d5959eb + 45119d3 commit a86d671
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions dist/angular-zendesk-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* widget instantiated but before page load, such as hiding
* the widget immediately. Receives the raw zE API object.
* Callback does *not* need to wrap calls in a zE() closure.
* For more info, see:
* For more info, see:
* https://developer.zendesk.com/embeddables/docs/widget/api#ze.hide).
*/
this.init = function(opts) {
Expand All @@ -48,7 +48,10 @@

angular.forEach(apiMethods, function(method) {
ZendeskWidgetApi.prototype[method] = function() {
$window.zE[method].apply($window.zE, arguments);
var closureArgs = arguments;
$window.zE(function() {
$window.zE[method].apply($window.zE, closureArgs);
})
};
});

Expand Down
2 changes: 1 addition & 1 deletion dist/angular-zendesk-widget.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/angular-zendesk-widget/zendeskWidget.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* widget instantiated but before page load, such as hiding
* the widget immediately. Receives the raw zE API object.
* Callback does *not* need to wrap calls in a zE() closure.
* For more info, see:
* For more info, see:
* https://developer.zendesk.com/embeddables/docs/widget/api#ze.hide).
*/
this.init = function(opts) {
Expand All @@ -42,7 +42,10 @@

angular.forEach(apiMethods, function(method) {
ZendeskWidgetApi.prototype[method] = function() {
$window.zE[method].apply($window.zE, arguments);
var closureArgs = arguments;
$window.zE(function() {
$window.zE[method].apply($window.zE, closureArgs);
})
};
});

Expand Down

0 comments on commit a86d671

Please sign in to comment.