Skip to content

Commit

Permalink
Attempt at fixing possible bug in assign function
Browse files Browse the repository at this point in the history
  • Loading branch information
emilhe committed Oct 2, 2023
1 parent cfc8615 commit f7e57ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [1.0.4] - 31-07-23

### Changed

- Added `SerializationTransform` and `DataclassTransform`

## [1.0.3] - 31-07-23

### Added
Expand Down
5 changes: 5 additions & 0 deletions dash_extensions/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def __call__(self, var):
return variable(*all_args)

def add(self, src, name=None):
# Check if the function already exists.
for key in self.f_map:
if name is None and self.f_map[key] == src:
return key
# Otherwise add it.
name = f"function{len(self.f_map)}" if name is None else name
self.f_map[name] = src
return name
Expand Down

0 comments on commit f7e57ba

Please sign in to comment.