File tree 2 files changed +4
-0
lines changed
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_';
116
116
function createMutationSafeDatafileCopy ( datafile : any ) : ProjectConfig {
117
117
const datafileCopy = { ...datafile } ;
118
118
119
+ console . log ( datafile , datafileCopy ) ;
120
+
119
121
datafileCopy . audiences = ( datafile . audiences || [ ] ) . map ( ( audience : Audience ) => {
120
122
return { ...audience } ;
121
123
} ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ export const validateDatafile = function(datafile: unknown): any {
51
51
if ( SUPPORTED_VERSIONS . indexOf ( datafile [ 'version' as keyof unknown ] ) === - 1 ) {
52
52
throw new OptimizelyError ( INVALID_DATAFILE_VERSION , datafile [ 'version' as keyof unknown ] ) ;
53
53
}
54
+ } else {
55
+ throw new OptimizelyError ( INVALID_DATAFILE_MALFORMED ) ;
54
56
}
55
57
56
58
return datafile ;
You can’t perform that action at this time.
0 commit comments