Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 23573f0

Browse files
authored
fix($http): add check for functions in request
Avoid that functions in `params` object (like getter or setter) will be encoded in the url.
1 parent 01d6a47 commit 23573f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function $HttpParamSerializerProvider() {
4141
if (!params) return '';
4242
var parts = [];
4343
forEachSorted(params, function(value, key) {
44-
if (value === null || isUndefined(value)) return;
44+
if (value === null || isUndefined(value) || isFunction(value)) return;
4545
if (isArray(value)) {
4646
forEach(value, function(v) {
4747
parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));

0 commit comments

Comments
 (0)