Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@goji/core

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goji/core - npm Package Compare versions

Comparing version 0.6.8 to 0.6.9

18

dist/cjs/reconciler/hostConfig.js

@@ -16,8 +16,12 @@ "use strict";

const subtreeId = instance.getSubtreeId();
// If `attached` run before `getPublicInstance` we can get the component instance in sync
let componentInstance = Promise.resolve(subtreeId !== undefined && publicInstance_1.subtreeInstances.has(subtreeId)
? publicInstance_1.subtreeInstances.get(subtreeId)
: undefined);
// if `attached` have not run, we should wait for attach been called
if (!componentInstance && subtreeId !== undefined) {
let componentInstance;
if (subtreeId === undefined) {
componentInstance = undefined;
}
else if (publicInstance_1.subtreeInstances.has(subtreeId)) {
// If `attached` run before `getPublicInstance` we can get the component instance in sync
componentInstance = publicInstance_1.subtreeInstances.get(subtreeId);
}
else {
// if `attached` have not run, we should wait for attach been called
componentInstance = new Promise(resolve => {

@@ -30,3 +34,3 @@ subtreeAttachEvents_1.default.on(String(subtreeId), () => resolve(publicInstance_1.subtreeInstances.get(subtreeId)));

unsafe_gojiId: instance.id,
getComponentInstance: () => componentInstance,
getComponentInstance: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return componentInstance; }),
};

@@ -33,0 +37,0 @@ }

@@ -0,1 +1,2 @@

import { __awaiter } from "tslib";
import { ElementInstance, TextInstance } from './instance';

@@ -12,8 +13,12 @@ import { subtreeInstances } from './publicInstance';

const subtreeId = instance.getSubtreeId();
// If `attached` run before `getPublicInstance` we can get the component instance in sync
let componentInstance = Promise.resolve(subtreeId !== undefined && subtreeInstances.has(subtreeId)
? subtreeInstances.get(subtreeId)
: undefined);
// if `attached` have not run, we should wait for attach been called
if (!componentInstance && subtreeId !== undefined) {
let componentInstance;
if (subtreeId === undefined) {
componentInstance = undefined;
}
else if (subtreeInstances.has(subtreeId)) {
// If `attached` run before `getPublicInstance` we can get the component instance in sync
componentInstance = subtreeInstances.get(subtreeId);
}
else {
// if `attached` have not run, we should wait for attach been called
componentInstance = new Promise(resolve => {

@@ -26,3 +31,3 @@ events.on(String(subtreeId), () => resolve(subtreeInstances.get(subtreeId)));

unsafe_gojiId: instance.id,
getComponentInstance: () => componentInstance,
getComponentInstance: () => __awaiter(void 0, void 0, void 0, function* () { return componentInstance; }),
};

@@ -29,0 +34,0 @@ }

{
"name": "@goji/core",
"version": "0.6.8",
"version": "0.6.9",
"description": "GojiJS Core",

@@ -94,3 +94,3 @@ "main": "dist/cjs/index.js",

},
"gitHead": "235eaabb89e8a430487dcc29683eb16bf2ef3230"
"gitHead": "ea5d2bfbdcfc390ae4c85a91b9ce1dcba7412cb7"
}

@@ -31,11 +31,11 @@ import { Container } from '../container';

// If `attached` run before `getPublicInstance` we can get the component instance in sync
let componentInstance = Promise.resolve(
subtreeId !== undefined && subtreeInstances.has(subtreeId)
? subtreeInstances.get(subtreeId)
: undefined,
);
// if `attached` have not run, we should wait for attach been called
if (!componentInstance && subtreeId !== undefined) {
let componentInstance;
if (subtreeId === undefined) {
componentInstance = undefined;
} else if (subtreeInstances.has(subtreeId)) {
// If `attached` run before `getPublicInstance` we can get the component instance in sync
componentInstance = subtreeInstances.get(subtreeId);
} else {
// if `attached` have not run, we should wait for attach been called
componentInstance = new Promise(resolve => {

@@ -49,3 +49,3 @@ events.on(String(subtreeId), () => resolve(subtreeInstances.get(subtreeId)));

unsafe_gojiId: instance.id,
getComponentInstance: () => componentInstance,
getComponentInstance: async () => componentInstance,
};

@@ -52,0 +52,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc