You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i was using react-data-table-component package which is uses deep merge to custom merge styles to default styles.
it do not accept anonymous function because merge do not have filter.
Basically every time it replace text it need to check if its a function. Filter passed job is to have a flag to say check for function. Tomorrow filter can be something else. Today just see if its a function and excecute it and replace that value with original value.
This is your method
`function mergeObject(target, source, options) {
var destination = {};
if (options.isMergeableObject(target)) {
getKeys(target).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
});
}
getKeys(source).forEach(function(key) {
if (propertyIsUnsafe(target, key)) {
return
}
Hi
i was using react-data-table-component package which is uses deep merge to custom merge styles to default styles.
it do not accept anonymous function because merge do not have filter.
Basically every time it replace text it need to check if its a function. Filter passed job is to have a flag to say check for function. Tomorrow filter can be something else. Today just see if its a function and excecute it and replace that value with original value.
This is your method
`function mergeObject(target, source, options) {
var destination = {};
if (options.isMergeableObject(target)) {
getKeys(target).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
});
}
getKeys(source).forEach(function(key) {
if (propertyIsUnsafe(target, key)) {
return
}
//alexk code begin
var newdest=destination[key];
if(typeof newdest === 'function')
destination[key]=newdest();
//alexk code ends
});
}`
The text was updated successfully, but these errors were encountered: