Skip to content

Commit 31582e9

Browse files
committed
bug fix for passing in 'true' for isPreview not being respected
1 parent c738faa commit 31582e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agility/content-fetch",
3-
"version": "0.5.4",
3+
"version": "0.5.5",
44
"description": "JavaScript library for the Agility Fetch API (node and browser)",
55
"main": "dist/agility-content-fetch.node.js",
66
"scripts": {

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function buildRequestUrlPath(config, languageCode) {
22
let urlPath = null;
33
let apiFetchOrPreview = null;
44

5-
if(config.isPreview) {
5+
if(config.isPreview === true || config.isPreview === 'true') {
66
apiFetchOrPreview = 'preview';
77
} else {
88
apiFetchOrPreview = 'fetch';

0 commit comments

Comments
 (0)