11import typedFunction from 'typed-function'
2- import { deepFlatten , isLegacyFactory , values } from '../utils/object.js'
2+ import { deepFlatten , isLegacyFactory } from '../utils/object.js'
33import * as emitter from './../utils/emitter.js'
44import { importFactory } from './function/import.js'
55import { configFactory } from './function/config.js'
@@ -216,7 +216,7 @@ export function create (factories, config) {
216216 // listen for changes in config, import all functions again when changed
217217 // TODO: move this listener into the import function?
218218 math . on ( 'config' , ( ) => {
219- values ( importedFactories ) . forEach ( factory => {
219+ Object . values ( importedFactories ) . forEach ( factory => {
220220 if ( factory && factory . meta && factory . meta . recreateOnConfigChange ) {
221221 // FIXME: only re-create when the current instance is the same as was initially created
222222 // FIXME: delete the functions/constants before importing them again?
@@ -234,7 +234,7 @@ export function create (factories, config) {
234234
235235 // import the factory functions like createAdd as an array instead of object,
236236 // else they will get a different naming (`createAdd` instead of `add`).
237- math . import ( values ( deepFlatten ( factories ) ) )
237+ math . import ( Object . values ( deepFlatten ( factories ) ) )
238238
239239 math . ArgumentsError = ArgumentsError
240240 math . DimensionError = DimensionError
0 commit comments