We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71705ca commit 22d9637Copy full SHA for 22d9637
2 files changed
src/lib/stack/client.ts
@@ -70,11 +70,7 @@ export async function getGlobalFields(config: StackConnectionConfig) {
70
})
71
res.on('end', () => {
72
if (res.statusCode === 200) {
73
- try {
74
- resolve(JSON.parse(body))
75
- } catch (error) {
76
- reject('Parse error')
77
- }
+ resolve(JSON.parse(body))
78
} else {
79
reject(body)
80
}
src/lib/tsgen/factory.ts
@@ -297,7 +297,7 @@ export default function (userOptions: TSGenOptions) {
297
298
299
return function (contentType: ContentstackTypes.ContentType): TSGenResult|any {
300
- if (contentType.schema_type == 'global_field') {
+ if (contentType.schema_type === 'global_field') {
301
const name = name_type(contentType.uid)
302
if (!cachedGlobalFields[name]) {
303
cachedGlobalFields[name] = {
0 commit comments