File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ const RESERVED_ATTRIBUTE_PREFIX = '$opt_';
116116function createMutationSafeDatafileCopy ( datafile : any ) : ProjectConfig {
117117 const datafileCopy = { ...datafile } ;
118118
119+ console . log ( datafile , datafileCopy ) ;
120+
119121 datafileCopy . audiences = ( datafile . audiences || [ ] ) . map ( ( audience : Audience ) => {
120122 return { ...audience } ;
121123 } ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ export const validateDatafile = function(datafile: unknown): any {
5151 if ( SUPPORTED_VERSIONS . indexOf ( datafile [ 'version' as keyof unknown ] ) === - 1 ) {
5252 throw new OptimizelyError ( INVALID_DATAFILE_VERSION , datafile [ 'version' as keyof unknown ] ) ;
5353 }
54+ } else {
55+ throw new OptimizelyError ( INVALID_DATAFILE_MALFORMED ) ;
5456 }
5557
5658 return datafile ;
You can’t perform that action at this time.
0 commit comments