@pistonite/pure 0.22.1 → 0.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pistonite/pure",
3
- "version": "0.22.1",
3
+ "version": "0.22.3",
4
4
  "type": "module",
5
5
  "description": "Pure TypeScript libraries for my projects",
6
6
  "homepage": "https://github.com/Pistonite/pure",
@@ -126,6 +126,7 @@ export const makeExternalWeakRefType = <TUnderlying, TType>({
126
126
  if (weakRefObj.ref !== undefined) {
127
127
  free(weakRefObj.ref);
128
128
  }
129
+ weakRefObj.ref = undefined;
129
130
  },
130
131
  set: (value: TUnderlying | undefined) => {
131
132
  if (weakRefObj.ref !== undefined && weakRefObj.ref !== value) {
@@ -4,7 +4,7 @@
4
4
  * Will remove the old style tag(s) if exist
5
5
  */
6
6
  export function injectStyle(id: string, style: string) {
7
- const styleTags = document.querySelectorAll(`style[data-inject="${id}"`);
7
+ const styleTags = document.querySelectorAll(`style[data-inject="${id}"]`);
8
8
  if (styleTags.length !== 1) {
9
9
  const styleTag = document.createElement("style");
10
10
  styleTag.setAttribute("data-inject", id);