chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76c9c7c
)
pieces: make Object.create(null)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 19:05:00 +0000
(20:05 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 19:05:00 +0000
(20:05 +0100)
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index f9cef08c85855f24b1e2a731d4afde48407201e0..7cc03cfef3727bc14023272549005d64eef9a2c2 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-52,8
+52,7
@@
type PieceInfo = {
pelem : SVGGraphicsElement,
}
-let pieces : { [typeid: string]: PieceInfo } = Object();
- //Object.create(null);
+let pieces : { [typeid: string]: PieceInfo } = Object.create(null);
type MessageHandler = (op: Object) => void;
type PieceHandler = (piece: PieceId, p: PieceInfo, info: Object) => void;