@unsetsoft/ryunixjs 0.2.36-nightly.6 → 0.2.36-nightly.8

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": "@unsetsoft/ryunixjs",
3
- "version": "0.2.36-nightly.6",
3
+ "version": "0.2.36-nightly.8",
4
4
  "license": "MIT",
5
5
  "main": "./dist/Ryunix.js",
6
6
  "private": false,
@@ -1,5 +1,4 @@
1
1
  import { RYUNIX_TYPES } from "../utils/index";
2
- import { createElement } from "./createElement";
3
2
 
4
3
  /**
5
4
  * The function createContext creates a context object with a default value and methods to set and get
@@ -17,16 +16,7 @@ const createContext = (defaultValue) => {
17
16
  Provider: null,
18
17
  };
19
18
 
20
- context.Provider = (props) => {
21
- if (!props.value) {
22
- throw new Error("The value attribute is not provided.");
23
- }
24
-
25
- context.Value = props.value;
26
- props.children.context = context;
27
-
28
- return createElement("div", {}, props.children);
29
- };
19
+ context.Provider = (value) => (context.Value = value);
30
20
 
31
21
  return context;
32
22
  };