Skip to content

Commit 713d076

Browse files
committed
feat: fix return safestring
1 parent f47044c commit 713d076

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

__TESTS__/unit/url/url.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ describe('Tests for URL configuration', () => {
101101
expect(url).toEqual(`https://res.cloudinary.com/demo/image/upload/sample?_i=abcde&_z=1234&_t=false`);
102102
});
103103

104-
//just added for playground
105104
it('Should include query params', function () {
106105
const image = createNewImage('sample', {cloudName: 'demo'}, {queryParams: '_i=abcde&_z=1234&_t=false'});
107106
const url = image.toURL();

src/assets/CloudinaryFile.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,13 @@ class CloudinaryFile {
321321
if (shouldAddAnalytics) {
322322
queryParamsString += `${(queryParamsString.length > 0 ? "&" :"")}_a=${getSDKAnalyticsSignature(trackedAnalytics)}`;
323323
}
324-
325-
326-
if (queryParamsString) {
327-
return `${safeURL}?${queryParamsString}`;
328-
} else {
329-
return safeURL;
330-
}
331324
}
332325

326+
if (queryParamsString) {
327+
return `${safeURL}?${queryParamsString}`;
328+
} else {
329+
return safeURL;
330+
}
333331
}
334332
}
335333
}

0 commit comments

Comments
 (0)