File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,7 @@ export async function getGlobalFields(config: StackConnectionConfig) {
7070 } )
7171 res . on ( 'end' , ( ) => {
7272 if ( res . statusCode === 200 ) {
73- try {
74- resolve ( JSON . parse ( body ) )
75- } catch ( error ) {
76- reject ( 'Parse error' )
77- }
73+ resolve ( JSON . parse ( body ) )
7874 } else {
7975 reject ( body )
8076 }
Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ export default function (userOptions: TSGenOptions) {
297297 }
298298
299299 return function ( contentType : ContentstackTypes . ContentType ) : TSGenResult | any {
300- if ( contentType . schema_type == 'global_field' ) {
300+ if ( contentType . schema_type === 'global_field' ) {
301301 const name = name_type ( contentType . uid )
302302 if ( ! cachedGlobalFields [ name ] ) {
303303 cachedGlobalFields [ name ] = {
You can’t perform that action at this time.
0 commit comments