Skip to content

Commit

Permalink
Update ngForce-visualForceRemoting.js
Browse files Browse the repository at this point in the history
Moving standardOpts into the returned object so it will be defined.
  • Loading branch information
noeticpenguin committed Mar 20, 2015
1 parent d60b087 commit e2bcc14
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions jsSrc/subModules/ngForce-visualForceRemoting.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
*/
angular.module('ngForce')
.provider('vfr', function() {
/**
* Object contains the two standard fields needed by the .send method: escape and timeout.
* escape: Should the result be escape. default to false.
* timeout: set the timeout for visualforce to respond.
* @type {Object}
*/
var standardOpts = {
escape: false,
timeout: 10000
};

// Force shutdown the VFR provider / factory if VisualForce is not already an object on window.
if (typeof Visualforce != 'object') {
Expand All @@ -34,6 +24,16 @@ angular.module('ngForce')
var vfRemote = {};

return {
/**
* Object contains the two standard fields needed by the .send method: escape and timeout.
* escape: Should the result be escape. default to false.
* timeout: set the timeout for visualforce to respond.
* @type {Object}
*/
var standardOpts = {
escape: false,
timeout: 10000
},
setStandardOptions: function(newOptions) {
if (newOptions && typeof newOptions !== 'object') {
throw new Error('standardOptions must be an object');
Expand Down Expand Up @@ -186,4 +186,4 @@ angular.module('ngForce')
};
}
};
});
});

0 comments on commit e2bcc14

Please sign in to comment.