code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/lib/client.js b/lib/client.js @@ -50,13 +50,15 @@ class Client {
res.end();
}
- error(status, err) {
+ error(status, err, callId = err) {
const { req: { url }, res, connection } = this;
const reason = http.STATUS_CODES[status];
+ if (typeof err === 'number') err = undefined;
const error = err ? err.stack : reason;
const msg = status === 403 ? err.message : `${url} - ${error} - ${status}`;
application.logger.error(msg);
- const result = JSON.stringify({ result: 'error', reason });
+ const packet = { callback: callId, error: { message: reason } };
+ const result = JSON.stringify(packet);
if (connection) {
connection.send(result);
return;
@@ -81,7 +83,7 @@ class Client {
try {
await semaphore.enter();
} catch {
- this.error(504);
+ this.error(504, callId);
return;
}
const [iname, ver = '*'] = interfaceName.split('.');
@@ -89,12 +91,12 @@ class Client {
const session = await application.auth.restore(this);
const proc = application.runMethod(iname, ver, methodName, session);
if (!proc) {
- this.error(404);
+ this.error(404, callId);
return;
}
if (!session && proc.access !== 'public') {
const err = new Error(`Forbidden: ${interfaceName}/${methodName}`);
- this.error(403, err);
+ this.error(403, err, callId);
return;
}
const result = await proc.method(args);
@@ -107,7 +109,7 @@ class Client {
if (connection) connection.send(data);
else res.end(data);
} catch (err) {
- this.error(500, err);
+ this.error(500, err, callId);
} finally {
semaphore.leave();
}
| 7 |
diff --git a/lib/carto/dbdirect/certificate_manager.rb b/lib/carto/dbdirect/certificate_manager.rb @@ -44,10 +44,11 @@ module Carto
key = OpenSSL::PKey::RSA.new 2048
if passphrase.present?
cipher = OpenSSL::Cipher.new 'AES-128-CBC'
- key = key.export cipher, passphrase
- end
+ key.export cipher, passphrase
+ else
key.to_pem
end
+ end
def openssl_generate_csr(username, key, passphrase)
subj = OpenSSL::X509::Name.parse("/C=US/ST=New York/L=New York/O=CARTO/OU=Customer/CN=#{username}")
| 1 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,12 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.47.1] -- 2019-04-10
+
+### Fixed
+- Fix console errors during selections (bug introduced in 1.47.0) [#3755]
+
+
## [1.47.0] -- 2019-04-09
### Added
| 3 |
diff --git a/scenes/treehouse.scn b/scenes/treehouse.scn "start_url": "https://webaverse.github.io/silkworm/",
"dynamic": true
},
- {
- "position": [
- 2,
- 1,
- 0
- ],
- "quaternion": [
- 0,
- 0,
- 0,
- 1
- ],
- "physics": false,
- "start_url": "https://webaverse.github.io/damage-mesh/",
- "dynamic": true
- },
{
"position": [
2,
| 2 |
diff --git a/packages/vue/docs/design/sizes.md b/packages/vue/docs/design/sizes.md @@ -6,7 +6,7 @@ Below is the list of our standard sizes used for typography and its correspondin
<SfDocsSizes/>
-These sizes are defined [here](https://github.com/DivanteLtd/storefront-ui/blob/develop/packages/shared/styles/variables/css/_typography.scss)
+These sizes are defined [here](https://github.com/DivanteLtd/storefront-ui/blob/develop/packages/shared/styles/variables/_typography.scss)
## Icon sizes
@@ -14,7 +14,7 @@ Similarly, we provide the same standard sizes for customizing `SfIcon`.
<SfDocsIcons/>
-Each size used from this list for the icon will be converted to a proper size class, following the syntax `sf-icon--size-<size>`. For example `sf-icon--size-xxs`. These classes for sizes are defined [here](https://github.com/DivanteLtd/storefront-ui/blob/develop/packages/shared/styles/components/SfIcon.scss)
+Each size used from this list for the icon will be converted to a proper size class, following the syntax `sf-icon--size-<size>`. For example `sf-icon--size-xxs`. These classes for sizes are defined [here](https://github.com/DivanteLtd/storefront-ui/blob/develop/packages/shared/styles/components/atoms/SfIcon.scss)
You can apply any size from the list above to an icon, simply by passing the size's label to `size` prop, e.g
```html
@@ -36,5 +36,4 @@ export default {
}
</script>
```
-More information on `SfIcon` can be found [here](/components/Icon.md)
-
+More information on `SfIcon` can be found [here](/components/atoms/SfIcon/SfIcon.md)
| 1 |
diff --git a/articles/tutorials/redirecting-users.md b/articles/tutorials/redirecting-users.md ---
description: How to handle returning users after authentication.
---
-
# Redirect Users After Login
-To make your login process as easy-to-use and seamless as possible, you'll need provide Auth0 with explicit information on redirecting users back to your application after authentication.
+To make your login process as easy-to-use and seamless as possible, you'll need to keep track of where you want to route users inside your application once Auth0 redirects users back to your application after authentication.
-When implementing Auth0, please note that the `redirect_uri` field is actually used as a callback URL. Auth0 invokes callback URLs after the authentication process and are where your application gets routed. Because callback URLs can be manipulated by unauthorized parties, Auth0 recognizes only whitelisted URLs set in the `Allowed Callback URLs` field of a [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings) as valid.
+When implementing Auth0, please note that the `redirect_uri` field is used as a callback URL. Auth0 invokes callback URLs after the authentication process and are where your application gets routed. Because callback URLs can be manipulated by unauthorized parties, Auth0 recognizes only whitelisted URLs set in the `Allowed Callback URLs` field of a [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings) as valid.
The callback URL is not necessarily the same URL to which you want users redirected after authentication.
@@ -14,21 +13,6 @@ The callback URL is not necessarily the same URL to which you want users redirec
If you want to redirect authenticated users to a URL that is *not* the callback URL, you can do so using one of the following methods.
-### Store the Desired URL in the `state` Parameter
-
-The [`state` parameter](/protocols/oauth-state) is one of the supported Auth0 [Authentication Parameters](/libraries/lock/v10/sending-authentication-parameters). You can use this field to hold multiple values such as a JSON object that holds the URL you want to bring the user to.
-
-```
-state = {
- "auth0_authorize": "xyzABC123",
- "return_url": "https://yoursite.com/home"
-}
-```
-
-To send the `state` parameter, [add it to the `options` object](/libraries/lock/v10/sending-authentication-parameters). For additonal information on where to modify `options`, please see the doc on [Getting Started with Lock](/libraries/lock/v10#start-using-lock).
-
-After a successful request, you can used the `return_url` encapsulated in the returned `state` value to redirect users to the appropriate URL.
-
### Store the Desired URL in Web Storage
You can store the desired URL in web storage to be used after authentication. Storing a URL using this method is similar to [storing a JWT](/security/store-tokens#where-to-store-your-jwts). You can then create the necessary logic to obtain the stored URL to redirect your users after successful authentication.
| 2 |
diff --git a/package.json b/package.json "i18n-js": "^3.0.0"
},
"devDependencies": {
- "@sambego/storybook-state": "^1.3.2",
+ "@sambego/storybook-state": "^1.3.4",
"@storybook/addon-a11y": "^5.1.8",
"@storybook/addon-actions": "^5.1.8",
"@storybook/addon-info": "^5.1.8",
| 13 |
diff --git a/components/Discussion/enhancers.js b/components/Discussion/enhancers.js @@ -27,8 +27,9 @@ const emptyPageInfo = () => ({
endCursor: null
})
-const emptyCommentConnection = () => ({
+const emptyCommentConnection = comment => ({
__typename: 'CommentConnection',
+ id: comment.id,
totalCount: 0,
nodes: [],
pageInfo: emptyPageInfo()
@@ -117,30 +118,15 @@ const fragments = {
}
`,
// local only
- // used for reading and updating parent totalCount and hasNextPage
- commentCounts: gql`
- fragment CommentCounts on Comment {
+ // used for reading and updating totalCount and hasNextPage
+ connectionCounts: gql`
+ fragment ConnectionCounts on CommentConnection {
id
- comments {
- totalCount
- pageInfo {
- hasNextPage
- }
- }
- }
- `,
- // used for reading and updating root totalCount and hasNextPage
- discussionCounts: gql`
- fragment DiscussionCounts on Discussion {
- id
- # WARNING: arguments need to be alpha sorted here for cache keys
- comments(orderBy: $orderBy, parentId: $parentId) {
totalCount
pageInfo {
hasNextPage
}
}
- }
`
}
@@ -207,6 +193,7 @@ query discussion($discussionId: ID!, $parentId: ID, $after: String, $orderBy: Di
}
fragment ConnectionInfo on CommentConnection {
+ id
totalCount
pageInfo {
hasNextPage
@@ -300,8 +287,19 @@ graphql(rootQuery, {
}
debug('subscribe:event', {discussionId, comment})
- const existingComment = false // ToDo: mutation type != CREATED
+ const readConnection = id =>
+ client.readFragment({
+ id: dataIdFromObject({
+ __typename: 'CommentConnection',
+ id: id
+ }),
+ fragment: fragments.connectionCounts
+ })
+
+ // ToDo: mutation type != CREATED
+ const existingComment = !!readConnection(comment.id)
if (existingComment) {
+ // needed? maybe happens automatically by id
debug('subscribe:event:update', {discussionId, comment})
client.writeFragment({
id: dataIdFromObject(comment),
@@ -311,74 +309,34 @@ graphql(rootQuery, {
return
}
- const parents = comment.parentIds.map(parentId => {
- return client.readFragment({
- id: dataIdFromObject({
- __typename: 'Comment',
- id: parentId
- }),
- fragment: fragments.commentCounts
- })
- }).filter(Boolean)
-
+ const parentConnections = comment.parentIds
+ .map(readConnection)
+ .filter(Boolean)
const isRoot = !comment.parentIds.length
- if (parents.length || isRoot) {
- // ToDo: Update all possibly cached orderBys or force fetch on change
- const id = dataIdFromObject({
- __typename: 'Discussion',
- id: discussionId
- })
- const variables = {
- parentId,
- orderBy
- }
- const discussion = client.readFragment({
- id,
- fragment: fragments.discussionCounts,
- variables
- })
- const pageInfo = discussion.comments.pageInfo
- const data = {
- ...discussion,
- comments: {
- ...discussion.comments,
- totalCount: discussion.comments.totalCount + 1,
- pageInfo: {
- ...pageInfo,
- hasNextPage: isRoot ? true : pageInfo.hasNextPage
- }
- }
- }
- debug('subscribe:event:total', {discussionId, data})
-
- client.writeFragment({
- id,
- fragment: fragments.discussionCounts,
- variables,
- data
- })
+ if (
+ parentConnections.length || // known comment, rm once we have real parent ids array
+ isRoot
+ ) {
+ parentConnections.unshift(readConnection(discussionId))
}
- parents.forEach((parent, index) => {
- const pageInfo = parent.comments.pageInfo
+ parentConnections.forEach((connection, index) => {
+ const pageInfo = connection.pageInfo
const data = {
- ...parent,
- comments: {
- ...parent.comments,
- totalCount: parent.comments.totalCount + 1,
+ ...connection,
+ totalCount: connection.totalCount + 1,
pageInfo: {
...pageInfo,
- hasNextPage: index === parents.length - 1
+ hasNextPage: index === parentConnections.length - 1
? true
: pageInfo.hasNextPage
}
}
- }
debug('subscribe:event:total', {discussionId, data})
client.writeFragment({
- id: dataIdFromObject(parent),
- fragment: fragments.commentCounts,
+ id: dataIdFromObject(connection),
+ fragment: fragments.connectionCounts,
data
})
})
@@ -450,6 +408,7 @@ mutation discussionSubmitComment($discussionId: ID!, $parentId: ID, $id: ID!, $c
}
}
createdAt
+ updatedAt
}
}
`, {
@@ -499,15 +458,12 @@ mutation discussionSubmitComment($discussionId: ID!, $parentId: ID, $id: ID!, $c
// schema expects those to be present.
const comment = {
...submitComment,
- comments: emptyCommentConnection()
+ comments: emptyCommentConnection(submitComment)
}
// Insert the newly created comment to the head of the given 'parent'
// (which can be either the Discussion object or a Comment).
const replaceComment = (parent) => {
- if (!parent.comments) {
- parent.comments = emptyCommentConnection()
- }
const nodes = parent.comments.nodes || []
const existingComment = nodes.find(c => c.id === comment.id) || {}
| 4 |
diff --git a/package.json b/package.json "test:e2e:interactive": "npm run test:e2e -- --puppeteer-interactive",
"test:e2e:watch": "npm run test:e2e -- --watch",
"test:e2e:watch:interactive": "npm run test:e2e -- --watch --puppeteer-interactive",
- "storybook": "start-storybook -s ./dist -p 9001 -c .storybook --no-version-updates --no-manager-cache",
+ "storybook": "start-storybook -s ./dist -p 9001 -c .storybook --no-version-updates",
"storybook:vrt": "npm run storybook -- --ci --quiet",
"backstopjs": "backstop test --config=tests/backstop/config.js --docker",
"lint": "npm run lint:js && npm run lint:css",
| 2 |
diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js @@ -1165,7 +1165,7 @@ function createHoverText(hoverData, opts, gd) {
}
ly += HOVERTEXTPAD;
- legendContainer.attr('transform', strTranslate(lx, ly));
+ legendContainer.attr('transform', strTranslate(lx - 1, ly - 1));
return legendContainer;
}
| 5 |
diff --git a/package.json b/package.json "chalk": "1.1.3",
"chokidar": "1.6.0",
"cross-spawn": "4.0.0",
- "elm-doc-test": "1.2.0",
+ "elm-doc-test": "2.1.0",
"firstline": "^1.2.0",
"fs-extra": "0.30.0",
"lodash": "4.13.1",
| 3 |
diff --git a/packages/cli/src/models/files/ZosNetworkFile.js b/packages/cli/src/models/files/ZosNetworkFile.js @@ -217,14 +217,15 @@ export default class ZosNetworkFile {
delete this.data.contracts[alias]
}
+ unsetContract(alias) {
+ delete this.data.contracts[alias];
+ }
+
setProxies(packageName, alias, value) {
const fullname = toContractFullName(packageName, alias)
this.data.proxies[fullname] = value
}
- unsetContract(alias) {
- delete this.data.contracts[alias];
- }
addProxy(thepackage, alias, info) {
const fullname = toContractFullName(thepackage, alias)
@@ -247,6 +248,11 @@ export default class ZosNetworkFile {
this.data.proxies[fullname][index] = fn(this.data.proxies[fullname][index]);
}
+ proxyFromIndex(thepackage, alias, index) {
+ const fullname = toContractFullName(thepackage, alias)
+ return this.proxiesOf(fullname)[index]
+ }
+
indexOfProxy(fullname, address) {
return _.findIndex(this.data.proxies[fullname], { address })
}
| 0 |
diff --git a/lib/windshaft/backends/map_validator.js b/lib/windshaft/backends/map_validator.js @@ -35,7 +35,10 @@ MapValidatorBackend.prototype.validate = function(mapConfigProvider, callback) {
}
if (mapConfig.hasIncompatibleLayers()) {
- return callback(new Error(INCOMPATIBLE_LAYERS_ERROR));
+ const error = new Error(INCOMPATIBLE_LAYERS_ERROR);
+ error.type = 'layergroup';
+ error.http_status = 400;
+ return callback(error);
}
function validateMapnikTile(layerId) {
| 7 |
diff --git a/src/content/developers/docs/frameworks/index.md b/src/content/developers/docs/frameworks/index.md @@ -51,11 +51,11 @@ Before diving into frameworks, we recommend you first read through our introduct
- [Documentation](https://embark.status.im/docs/)
- [GitHub](https://github.com/embark-framework/embark)
-**Epirus -** **_A platform for developing, deploying and monitoring blockchain applications on the JVM_**
+**Web3j -** **_A platform for developing blockchain applications on the JVM_**
-- [Homepage](https://www.web3labs.com/epirus)
-- [Documentation](https://docs.epirus.io)
-- [GitHub](https://github.com/epirus-io/epirus-cli)
+- [Homepage](https://www.web3labs.com/web3j-sdk)
+- [Documentation](https://docs.web3j.io)
+- [GitHub](https://github.com/web3j/web3j)
**OpenZeppelin SDK -** **_The Ultimate Smart Contract Toolkit: A suite of tools to help you develop, compile, upgrade, deploy and interact with smart contracts._**
| 14 |
diff --git a/README.md b/README.md 
-
+___
Learn JavaScript fundamentals through fun and challenging quizzes!
View the app online here: [https://quiz.typeofnan.dev](https://quiz.typeofnan.dev)
-# How to run the app locally
+# :rocket: How to run the app locally
-In order to use this app locally, the package manager _yarn_ needs to be installed
+In order to use this app locally, the package manager _yarn_ **needs to be installed**
If you don't have it installed yet, head over to:
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
and install the latest yarn version for your system.
-
+___
### 1. Clone the repo
-Run this command to clone the repo
+- Run this command to clone the repo
`git clone https://github.com/nas5w/typeofnan-javascript-quizzes`
### 2. Install dependencies
-First, before you can use the app, you have to run this command to install all the dependencies
+- First, before you can use the app, you have to run this command to install all the dependencies
`yarn install`
### 3. Start and view the app
-After you've installed all the dependencies, run this command to start the app
+ - After you've installed all the dependencies, run this command to start the app
`yarn start`
-
+___
Then open, in your browser, this link `http://localhost:8000/` to view it!
-# Contributing
+# :construction: Contributing
I invite you to contribute to this repository! You can do so by opening an issue, or by directly contributing questions.
@@ -41,6 +41,6 @@ To directly contribute a quiz question, do the following:
If you have any questions, let me know!
-# About the app
+# :clipboard: About the app
The app was bootstrapped using the `gatsby-starter-blog` template and then massaging it into a format condusive to quizzing. The app is deployed from `master` to Netlify.
| 0 |
diff --git a/src/dom_components/config/config.js b/src/dom_components/config/config.js @@ -37,7 +37,7 @@ module.exports = {
// structure, but in case you need it you can use this option.
// If you have `config.avoidInlineStyle` disabled the wrapper will be stored
// as we need to store inlined style.
- storeWrapper: 1,
+ storeWrapper: 0,
// List of void elements
voidElements: [
| 12 |
diff --git a/packages/idyll-cli/test/basic-project/test.js b/packages/idyll-cli/test/basic-project/test.js @@ -141,16 +141,24 @@ test('should include components configured in package.json', () => {
expect(Object.keys(output.components)).toContain('package-json-component-test');
})
-// This tests for just the *default* components being in getComponents
-// TODO may need to hardcode *all* components, including custom ones
-test('Idyll getComponents() gets all default components', () => {
+// Tests for default and custom components
+test('Idyll getComponents() gets all default & custom components', () => {
var defaultComponentsDirectory = __dirname + '/../../../idyll-components/src/';
var idyllComponents = idyll.getComponents();
- var componentNames = idyllComponents.map(comp => comp.name);
-
+ var componentNames = idyllComponents.map(comp => comp.name + '.js');
// Ensure that the getComponents() have all of the default component file names
fs.readdirSync(defaultComponentsDirectory).forEach(file => {
- expect(componentNames).toContain(file + "");
+ if (file !== 'index.js') {
+ expect(componentNames).toContain(file + '');
+ }
+ })
+
+ // Ensure that we also get the custom components
+ var customComponentsPath = __dirname + '/src/components/';
+ fs.readdirSync(customComponentsPath).forEach(file => {
+ if (file !== 'index.js') {
+ expect(componentNames).toContain(file + '');
+ }
})
})
| 3 |
diff --git a/src/webroutes/getFullReport.js b/src/webroutes/getFullReport.js @@ -16,14 +16,14 @@ const context = 'WebServer:getFullReport';
module.exports = async function action(res, req) {
let timeStart = new Date();
let out = '';
-
+ let cpus;
try {
let giga = 1024 * 1024 * 1024;
let memFree = (os.freemem() / giga).toFixed(2);
let memTotal = (os.totalmem() / giga).toFixed(2);
let memUsage = (((memTotal-memFree) / memTotal)*100).toFixed(0);
- let cpus = os.cpus();
let userInfo = os.userInfo()
+ cpus = os.cpus();
out += `<b>OS Type:</b> ${os.type()} (${os.platform()})\n`;
out += `<b>OS Release:</b> ${os.release()}\n`;
@@ -32,7 +32,7 @@ module.exports = async function action(res, req) {
out += `<b>Host Memory:</b> ${memUsage}% (${memFree}/${memTotal} GB)\n`
out += '\n<hr>';
} catch (error) {
- logWarn('Error getting Host data', context);
+ logError('Error getting Host data', context);
if(globals.config.verbose) dir(error);
out += `Failed to retrieve host data. Check the terminal for more information (if verbosity is enabled)\n<hr>`;
}
@@ -40,10 +40,11 @@ module.exports = async function action(res, req) {
let procList = await getProcessesData();
procList.forEach(proc => {
+ let relativeCPU = (proc.cpu/cpus.length).toFixed(2);
out += `<b>Process:</b> ${proc.name}\n`;
// out += `<b>PID:</b> ${proc.pid}\n`;
out += `<b>Memory:</b> ${prettyBytes(proc.memory)}\n`;
- out += `<b>CPU:</b> ${proc.cpu.toFixed(2)}%\n`;
+ out += `<b>CPU:</b> ${relativeCPU}%\n`;
out += '\n';
});
@@ -107,7 +108,7 @@ async function getProcessesData(){
});
} catch (error) {
- logWarn(`Error getting processes data.`, context);
+ logError(`Error getting processes data.`, context);
if(globals.config.verbose) dir(error);
}
| 4 |
diff --git a/source/Renderer/shaders/pbr.frag b/source/Renderer/shaders/pbr.frag @@ -206,7 +206,7 @@ MaterialInfo getSpecularGlossinessInfo(MaterialInfo info)
return info;
}
-MaterialInfo getMetallicRoughnessInfo(MaterialInfo info, float f0_ior)
+MaterialInfo getMetallicRoughnessInfo(MaterialInfo info)
{
info.metallic = u_MetallicFactor;
info.perceptualRoughness = u_RoughnessFactor;
@@ -220,7 +220,7 @@ MaterialInfo getMetallicRoughnessInfo(MaterialInfo info, float f0_ior)
#endif
// Achromatic f0 based on IOR.
- vec3 f0 = vec3(f0_ior);
+ vec3 f0 = info.f0;
info.albedoColor = mix(info.baseColor.rgb * (vec3(1.0) - f0), vec3(0), info.metallic);
info.f0 = mix(f0, info.baseColor.rgb, info.metallic);
@@ -304,7 +304,7 @@ MaterialInfo getClearCoatInfo(MaterialInfo info, NormalInfo normalInfo, float f0
MaterialInfo getIorInfo(MaterialInfo info)
{
- info.f0 = vec3(pow(( u_ior - 1.0f) / (u_ior + 1.0f),2));
+ info.f0 = vec3(pow(( u_ior - 1.0f) / (u_ior + 1.0f),2.0));
return info;
}
@@ -342,10 +342,9 @@ void main()
// The default index of refraction of 1.5 yields a dielectric normal incidence reflectance of 0.04.
float ior = 1.5;
- materialInfo.f0 = 0.04;
+ materialInfo.f0 = vec3(0.04);
#ifdef MATERIAL_IOR
materialInfo = getIorInfo(materialInfo);
- ior = u_ior;
#endif
#ifdef MATERIAL_SPECULARGLOSSINESS
@@ -353,7 +352,7 @@ void main()
#endif
#ifdef MATERIAL_METALLICROUGHNESS
- materialInfo = getMetallicRoughnessInfo(materialInfo, materialInfo.f0);
+ materialInfo = getMetallicRoughnessInfo(materialInfo);
#endif
#ifdef MATERIAL_SHEEN
| 2 |
diff --git a/packages/mjml-group/src/index.js b/packages/mjml-group/src/index.js @@ -158,7 +158,18 @@ export default class MjGroup extends BodyComponent {
})}
>
<!--[if mso | IE]>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <table
+ ${this.htmlAttributes({
+ bgcolor:
+ this.getAttribute('background-color') === 'none'
+ ? undefined
+ : this.getAttribute('background-color'),
+ border: '0',
+ cellpadding: '0',
+ cellspacing: '0',
+ role: 'presentation',
+ })}
+ >
<tr>
<![endif]-->
${this.renderChildren(children, {
| 12 |
diff --git a/src/nitrogen.erl b/src/nitrogen.erl @@ -93,6 +93,8 @@ ws_info({comet_actions, Actions} , _Bridge, _State) ->
wf:wire(page, page, Actions),
Return = wf_core:run_websocket_comet(),
{reply, {text, [<<"nitrogen_system_event:">>, Return]}};
+ws_info({'EXIT', _Pid, normal}, _Bridge, _State) ->
+ noreply;
ws_info(Msg, _Bridge, _State) ->
error_logger:warning_msg("Unhandled message(~p) to websocket process (~p)~n", [Msg, self()]),
noreply.
| 9 |
diff --git a/src/runtime/components/legacy/defineWidget-legacy-browser.js b/src/runtime/components/legacy/defineWidget-legacy-browser.js @@ -42,7 +42,12 @@ module.exports = function defineWidget(def, renderer) {
if (!proto.___isComponent) {
// Inherit from Component if they didn't already
- inherit(ComponentClass, BaseComponent);
+ ComponentClass.prototype = Object.create(BaseComponent.prototype);
+ for (var propName in proto) {
+ if (proto.hasOwnProperty(propName)) {
+ ComponentClass.prototype[propName] = proto[propName];
+ }
+ }
}
// The same prototype will be used by our constructor after
| 4 |
diff --git a/src/journeys_utils.js b/src/journeys_utils.js @@ -14,6 +14,7 @@ journeys_utils.bannerHeight = '76px';
journeys_utils.isFullPage = false;
journeys_utils.isHalfPage = false;
journeys_utils.divToInjectParents = [];
+journeys_utils.isSafeAreaEnabled = false;
// used to set height of full page interstitials
journeys_utils.windowHeight = window.innerHeight;
@@ -457,23 +458,32 @@ journeys_utils._isSafeAreaRequired = function(journeyLinkData) {
return false;
}
+journeys_utils.resizeListener = function () {
+ if (journeys_utils.isSafeAreaEnabled) {
+ journeys_utils._resetJourneysBannerPosition(false);
+ }
+}
+
+journeys_utils.scrollListener = function () {
+ if (journeys_utils.isSafeAreaEnabled) {
+ if (window.pageYOffset > window.innerHeight) {
+ journeys_utils._resetJourneysBannerPosition(true);
+ } else {
+ journeys_utils._resetJourneysBannerPosition(false);
+ }
+ }
+}
+
journeys_utils._dynamicallyRepositionBanner = function() {
+ journeys_utils.isSafeAreaEnabled = true;
// disable Journey animation to avoid lag when repositioning the banner
document.getElementById('branch-banner-iframe').style.transition = "all 0s"
// make sure on the first journey load the position is correct
journeys_utils._resetJourneysBannerPosition(false, true);
// resize listener for Safari in-app webview resize due to bottom/top nav bar
- window.addEventListener("resize", function () {
- journeys_utils._resetJourneysBannerPosition(false);
- });
+ window.addEventListener("resize", journeys_utils.resizeListener());
// scroll listener for bottom overscrolling edge case
- window.addEventListener("scroll", function () {
- if (window.pageYOffset > window.innerHeight) {
- journeys_utils._resetJourneysBannerPosition(true);
- } else {
- journeys_utils._resetJourneysBannerPosition(false);
- }
- });
+ window.addEventListener("scroll", journeys_utils.scrollListener());
}
journeys_utils._resetJourneysBannerPosition = function(isPageBottomOverScrolling, checkIfPageAlreadyScrollingOnFirstLoad) {
@@ -730,6 +740,13 @@ journeys_utils.animateBannerExit = function(banner, dismissedJourneyProgrammatic
banner_utils.removeClass(document.body, 'branch-banner-is-active');
banner_utils.removeClass(document.body, 'branch-banner-no-scroll');
+ // clear any safe area listeners on banner closing
+ if (journeys_utils.isSafeAreaEnabled) {
+ journeys_utils.isSafeAreaEnabled = false;
+ window.removeEventListener("resize", journeys_utils.resizeListener());
+ window.removeEventListener("scroll", journeys_utils.scrollListener());
+ }
+
journeys_utils.branch._publishEvent('didCloseJourney', journeys_utils.journeyLinkData);
if (!dismissedJourneyProgrammatically) {
journeys_utils.branch._publishEvent('branch_internal_event_didCloseJourney', journeys_utils.journeyLinkData);
| 2 |
diff --git a/README.md b/README.md @@ -92,6 +92,9 @@ See the [Contribution](https://github.com/r-spacex/SpaceX-API/blob/master/CONTRI
```bash
docker pull jakewmeyer/spacex-api
```
+* Deploy on your own Heroku app below
+
+[](https://heroku.com/deploy)
## FAQ's
* If you have any questions or corrections, please open an issue and we'll get it merged ASAP
| 3 |
diff --git a/app/models/carto/user_migration_import.rb b/app/models/carto/user_migration_import.rb @@ -153,6 +153,7 @@ module Carto
service.import_metadata_from_directory(imported, package.meta_dir)
end
rescue => e
+ org_import? ? self.organization = nil : self.user = nil
log.append('=== Error importing visualizations and search tweets. Rollback! ===')
rollback_import_data(package)
service.rollback_import_from_directory(package.meta_dir)
| 12 |
diff --git a/.eslintrc.json b/.eslintrc.json "prettier/prettier": 2,
"ava/no-ignored-test-files": 0,
"ava/no-import-test-files": 0,
- "import/no-unresolved": 2,
+ "import/no-unresolved": [2, { "ignore": ["ava", "got"] }],
"import/no-unused-modules": 2,
"import/order": [2, { "newlines-between": "never" }]
}
| 8 |
diff --git a/src/components/appNavigation/AppNavigation.js b/src/components/appNavigation/AppNavigation.js @@ -59,20 +59,20 @@ const AppNavigator = createSwitchNavigator(routes, { initialRouteName })
* Dashboard is the initial route
*/
class AppNavigation extends React.Component<AppNavigationProps, AppNavigationState> {
- checkAuthStatus() {
- if (this.props.store.get('isLoggedInCitizen')) return
+ // checkAuthStatus() {
+ // if (this.props.store.get('isLoggedInCitizen')) return
- // if not isLoggedInCitizen yet we should check status
- return checkAuthStatus(this.props.store)
- }
+ // // if not isLoggedInCitizen yet we should check status
+ // return checkAuthStatus(this.props.store)
+ // }
- async componentDidMount() {
- await this.checkAuthStatus()
- }
+ // async componentDidMount() {
+ // await this.checkAuthStatus()
+ // }
- async componentDidUpdate() {
- await this.checkAuthStatus()
- }
+ // async componentDidUpdate() {
+ // await this.checkAuthStatus()
+ // }
render() {
const account = this.props.store.get('account')
| 2 |
diff --git a/config/redirects.js b/config/redirects.js @@ -567,10 +567,6 @@ module.exports = [
from: '/login-widget',
to: '/libraries/login-widget'
},
- {
- from: '/login-widget2',
- to: '/libraries/login-widget2'
- },
{
from: ['/okta', '/saml/identity-providers/okta'],
to: '/protocols/saml/identity-providers/okta'
| 2 |
diff --git a/index.html b/index.html if (options.publicBrowser) {
$("#editionLabel").html(release.name);
$("#versionLabel").html(release.latestVersion.version);
- initVersionsDropdown(release);
+ initVersionsDropdown(release.shortName);
} else {
$("#editionLabel").html(release.name + " " + release.latestVersion.version);
}
if (options.publicBrowser) {
$("#editionLabel").html(release.name);
$("#versionLabel").html(release.latestVersion.version);
- initVersionsDropdown(release);
+ initVersionsDropdown(release.shortName);
} else {
$("#editionLabel").html(release.name + " " + release.latestVersion.version);
}
if (options.publicBrowser) {
$("#editionLabel").html(release.name);
$("#versionLabel").html(release.latestVersion.version);
- initVersionsDropdown(release);
+ initVersionsDropdown(release.shortName);
} else {
$("#editionLabel").html(release.name + " " + release.latestVersion.version);
}
| 1 |
diff --git a/generate.js b/generate.js @@ -171,7 +171,7 @@ for(var l in languages){
${langLessons.map((x,i)=> {
let s = `<li><a href="${getFileName(lang,i,false,x.chapter)}">${x[lang]["title"]}</a></li>`;
if(x.chapter != undefined){
- s = `</ul><h3>${getWord(words,lang,"chapter")} ${x.chapter}</h3><ul>` + s;
+ s = `</ul><h3><a href="${getFileName(lang,i,false,x.chapter)}">${x[lang]["title"]}</a></h3><ul>`;
}
return s;
}).join("\n")}
| 7 |
diff --git a/aleph/analyze/analyzer.py b/aleph/analyze/analyzer.py import logging
-from flask import _request_ctx_stack
from aleph import settings
-from aleph.core import celery
+from aleph.core import celery, db
from aleph.model import DocumentTagCollector
from alephclient.services.common_pb2 import Text
@@ -43,6 +42,7 @@ class TextIterator(object):
# input iterable for request-iterating services. This means
# that database queries on db.session will fail unless an
# active request context exists for the thread.
+ db.app = celery.app
with celery.app.app_context():
languages = list(document.languages)
if not len(languages):
| 12 |
diff --git a/views/shoppinglist.blade.php b/views/shoppinglist.blade.php <i class="fas fa-cart-plus"></i> {{ $L('Add products that are below defined min. stock amount') }}
</a>
</h1>
+ <p class="btn btn-lg btn-info no-real-button responsive-button">{{ Pluralize(count($missingProducts), $L('#1 product is below defined min. stock amount', count($missingProducts)), $L('#1 products are below defined min. stock amount', count($missingProducts))) }}</p>
</div>
</div>
</thead>
<tbody>
@foreach($listItems as $listItem)
- <tr class="@if($listItem->amount_autoadded > 0) table-info @endif">
+ <tr class="@if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $listItem->product_id) !== null) table-info @endif">
<td class="fit-content">
<a class="btn btn-sm btn-info" href="{{ $U('/shoppinglistitem/') }}{{ $listItem->id }}">
<i class="fas fa-edit"></i>
| 4 |
diff --git a/guide/additional-info/async-await.md b/guide/additional-info/async-await.md @@ -40,11 +40,11 @@ In this scenario, the `deleteMessages` function returns a Promise. The `.then()`
## How to implement async/await
### Theory
-The following information is important to know before starting working with async/await. You can only use the `await` keyword inside a function that is declared as `async` (you put the async keyword before the function keyword or before the parameters when using a callback function).
+The following information is important to know before working with async/await. You can only use the `await` keyword inside a function that is declared as `async` (you put the async keyword before the function keyword or before the parameters when using a callback function).
A simple example would be:
```js
-async function declaredAsync() {
+async function declaredAsAsync() {
// code
}
```
@@ -55,7 +55,7 @@ const declaredAsAsync = async () => {
}
```
-you can use that aswell if you use the Arrow function as a event listener function.
+You can use that as well if you use the arrow function as an event listener.
```js
client.on('event', async (first, last) => {
| 9 |
diff --git a/src/module/config.js b/src/module/config.js @@ -1561,7 +1561,10 @@ SFRPG.itemTypes = {
"technological": "SFRPG.Items.Categories.TechnologicalItems",
"theme": "SFRPG.Items.Categories.Themes",
"upgrade": "SFRPG.Items.Categories.ArmorUpgrades",
- "weapon": "SFRPG.Items.Categories.Weapons"
+ "weapon": "SFRPG.Items.Categories.Weapons",
+ "shield": "SFRPG.Items.Categories.Shields",
+ "ammunition": "SFRPG.Items.Categories.Ammunition",
+ "weaponAccessory": "SFRPG.Items.Categories.WeaponAccessories"
};
SFRPG.containableTypes = {
| 0 |
diff --git a/lib/glucose-get-last.js b/lib/glucose-get-last.js @@ -8,7 +8,9 @@ var getLastGlucose = function (data) {
}).map(function prepGlucose (obj) {
//Support the NS sgv field to avoid having to convert in a custom way
obj.glucose = obj.glucose || obj.sgv;
+ if ( obj.glucose !== null ) {
return obj;
+ }
});
var now = data[0];
| 8 |
diff --git a/src/lib/gl_format_color.js b/src/lib/gl_format_color.js @@ -25,7 +25,7 @@ function calculateColor(colorIn, opacityIn) {
}
function validateColor(colorIn) {
- return rgba(colorIn) || colorDfltRgba;
+ return isNumeric(colorIn) ? colorDfltRgba : (rgba(colorIn) || colorDfltRgba);
}
function validateOpacity(opacityIn) {
@@ -50,9 +50,7 @@ function formatColor(containerIn, opacityIn, len) {
);
}
else {
- sclFunc = function(c) {
- return c;
- };
+ sclFunc = validateColor;
}
if(isArrayColorIn) {
| 8 |
diff --git a/client/main.client.js b/client/main.client.js @@ -84,16 +84,17 @@ Meteor.startup(() => {
});
window.onbeforeunload = function (e) {
+ let event = e || window.event;
+
if(Meteor.status().connected) {
- e.cancel();
+ event.cancel();
}
- const message = "Do you really want to leave 4Minitz?",
- e = e || window.event;
+
+ const message = "Do you really want to leave 4Minitz?";
// For IE and Firefox
- if (e) {
- e.returnValue = message;
+ if (event) {
+ event.returnValue = message;
}
-
// For Safari
return message;
};
| 7 |
diff --git a/plugins/gameobjects/containerlite/ContainerLite.d.ts b/plugins/gameobjects/containerlite/ContainerLite.d.ts @@ -41,6 +41,12 @@ export default class ContainerLite extends Phaser.GameObjects.Zone {
y: number
): this;
+ setChildLocalPosition(
+ child: Phaser.GameObjects.GameObject,
+ x: number,
+ y: number
+ ): this;
+
setChildRotation(
child: Phaser.GameObjects.GameObject,
rotation: number
@@ -52,6 +58,12 @@ export default class ContainerLite extends Phaser.GameObjects.Zone {
scaleY: number
): this;
+ setChildLocalScale(
+ child: Phaser.GameObjects.GameObject,
+ scaleX: number,
+ scaleY: number
+ ): this;
+
setChildDisplaySize(
child: Phaser.GameObjects.GameObject,
width: number,
@@ -60,7 +72,7 @@ export default class ContainerLite extends Phaser.GameObjects.Zone {
setChildVisible(
child: Phaser.GameObjects.GameObject,
- visible: number
+ visible: boolean
): this;
setChildAlpha(
@@ -68,6 +80,11 @@ export default class ContainerLite extends Phaser.GameObjects.Zone {
alpha: number
): this;
+ setChildLocalAlpha(
+ child: Phaser.GameObjects.GameObject,
+ alpha: number
+ ): this;
+
resetChildState(
child: Phaser.GameObjects.GameObject
): this;
@@ -96,8 +113,12 @@ export default class ContainerLite extends Phaser.GameObjects.Zone {
child: Phaser.GameObjects.GameObject
): this;
+ tween(
+ config: Phaser.Types.Tweens.TweenBuilderConfig
+ ): this
+
tweenChild(
- config: any
+ config: Phaser.Types.Tweens.TweenBuilderConfig
): this
getChildren(
| 7 |
diff --git a/src/lib/realmdb/feedSource/NewsSource.js b/src/lib/realmdb/feedSource/NewsSource.js @@ -73,6 +73,7 @@ export default class NewsSource extends FeedSource {
log.debug('Ceramic fetched posts', { ceramicPosts, formatedCeramicPosts })
+ await Feed.find({ type: 'news' }).delete()
await Feed.save(...formatedCeramicPosts)
await storage.setItem(historyCacheId, historyId)
}
| 0 |
diff --git a/src/screens/transfer/screen/transferScreen.js b/src/screens/transfer/screen/transferScreen.js -import React, { Fragment, Component, useState, useRef, useEffect } from 'react';
+import React, { Fragment, useState, useRef } from 'react';
import { Text, View, ScrollView, TouchableOpacity } from 'react-native';
import { WebView } from 'react-native-webview';
-import ActionSheet from 'react-native-actionsheet';
import { injectIntl } from 'react-intl';
import get from 'lodash/get';
@@ -20,6 +19,7 @@ import {
} from '../../../components';
import styles from './transferStyles';
+import { OptionsModal } from '../../../components/atoms';
const TransferView = ({
currentAccountName,
@@ -275,7 +275,7 @@ const TransferView = ({
</View>
</ScrollView>
</View>
- <ActionSheet
+ <OptionsModal
ref={confirm}
options={[
intl.formatMessage({ id: 'alert.confirm' }),
| 14 |
diff --git a/server/game/cards/04.5-AaN/GameOfSadane.js b/server/game/cards/04.5-AaN/GameOfSadane.js @@ -27,8 +27,13 @@ class GameOfSadane extends DrawCard {
}
duelOutcome(context, winner, loser) {
+ if(winner && loser) {
this.game.addMessage('{0} wins the duel and is honored - {1} loses and is dishonored', winner, loser);
this.game.applyGameAction(context, { honor: winner, dishonor: loser });
+ } else {
+ this.game.addMessage('{0} wins the duel and is honored', winner);
+ this.game.applyGameAction(context, { honor: winner });
+ }
}
}
| 9 |
diff --git a/src/shared/util.js b/src/shared/util.js @@ -1483,6 +1483,7 @@ MessageHandler.prototype = {
if (this.isCancelled) {
return;
}
+ this.isCancelled = true;
sendStreamRequest({ stream: 'close', });
delete self.streamSinks[streamId];
},
| 12 |
diff --git a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js @@ -39,6 +39,7 @@ var writeFileSync = require( '@stdlib/fs/write-file' ).sync;
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
var readJSON = require( '@stdlib/fs/read-json' ).sync;
var existsSync = require( '@stdlib/fs/exists' ).sync;
+var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var contains = require( '@stdlib/assert/contains' );
var repeat = require( '@stdlib/string/repeat' );
var trim = require( '@stdlib/string/trim' );
@@ -1074,7 +1075,83 @@ function publish( pkg, clbk ) {
* @private
*/
function publishToNPM() {
+ var command;
+ var devDeps;
+ var cliPkg;
+ var found;
+ var opts;
+ var deps;
+ var dep;
+
console.log( 'Publishing '+dist+' to npm...' );
+ opts = {
+ 'cwd': dist
+ };
+ if ( hasCLI ) {
+ // Delete the `bin` field from the `package.json` file:
+ delete pkgJSON.bin;
+
+ // Delete files:
+ command = 'rm -rf ./bin/cli && rm test/test.cli.js && rm etc/cli_opts.json && rm docs/usage.txt';
+ shell( command, opts );
+
+ // Remove CLI section:
+ command = 'find . -type f -name \'*.md\' -print0 | xargs -0 perl -0777 -i -pe "s/(\\* \\* \\*\n+)?<section class=\\"cli\\">[\\s\\S]+?<\\!\\-\\- \\/.cli \\-\\->//"';
+ shell( command, opts );
+
+ // Add entry for CLI package to "See Also" section of README.md:
+ cliPkg = distPkg + '-cli';
+ cliPkg = replace( cliPkg, '\\', '\\\\' );
+ cliPkg = replace( cliPkg, '@', '\\@' );
+
+ command = 'find . -type f -name \'*.md\' -print0 | xargs -0 perl -0777 -i -pe "s/<section class=\\"related\\">(?:\n\n\\* \\* \\*\n\n## See Also\n\n)?/<section class=\\"related\\">\n\n## See Also\n\n- <span class=\\"package-name\\">[\\`'+cliPkg+'\\`]['+cliPkg+']<\\/span><span class=\\"delimiter\\">: <\\/span><span class=\\"description\\">CLI package for use as a command-line utility.<\\/span>\n/"';
+ shell( command, opts );
+
+ // Add link definition for CLI package to README.md:
+ command = 'find . -type f -name \'*.md\' -print0 | xargs -0 perl -0777 -i -pe "s/<section class=\\"links\\">/<section class=\\"links\\">\n\n['+cliPkg+']: https:\\/\\/www.npmjs.com\\/package\\/'+cliPkg+'/"';
+ shell( command, opts );
+
+ // For all dependencies, check in all *.js files if they are still used; if not, remove them:
+ deps = pkgJSON.dependencies;
+ for ( dep in deps ) {
+ if ( hasOwnProp( deps, dep ) ) {
+ dep = replace( dep, '@', '\\@' );
+ dep = replace( dep, '/', '\\/' );
+ command = [
+ 'if ! grep -q "'+dep+'" lib/** && ! grep -q -s "'+dep+'" manifest.json && ! grep -q -s "'+dep+'" include.gypi; then',
+ ' echo "false"',
+ 'else',
+ ' echo "true"',
+ 'fi'
+ ].join( '\n' );
+ found = shell( command, opts ).toString();
+ if ( found === 'false' ) {
+ delete pkgJSON.dependencies[ dep ];
+ }
+ }
+ }
+ devDeps = pkgJSON.devDependencies;
+ for ( dep in devDeps ) {
+ if ( !contains( devDeps[ dep ], '@stdlib' ) ) {
+ continue;
+ }
+ if ( hasOwnProp( devDeps, dep ) ) {
+ dep = replace( dep, '@', '\\@' );
+ dep = replace( dep, '/', '\\/' );
+ command = [
+ 'if ! grep -q "'+dep+'" lib/** && ! grep -q -s "'+dep+'" manifest.json && ! grep -q -s "'+dep+'" include.gypi; then',
+ ' echo "false"',
+ 'else',
+ ' echo "true"',
+ 'fi'
+ ].join( '\n' );
+ found = shell( command, opts ).toString();
+ if ( found === 'false' ) {
+ delete pkgJSON.devDependencies[ dep ];
+ }
+ }
+ }
+ }
// Replace GitHub links to individual packages with npm links:
shell( 'find '+dist+' -type f -name \'*.md\' -print0 | xargs -0 sed -Ei \'/tree\\/main/b; s/@stdlib\\/([^:]*)\\]: https:\\/\\/github.com\\/stdlib-js/@stdlib\\/\\1\\]: https:\\/\\/www.npmjs.com\\/package\\/@stdlib/g\'' );
| 9 |
diff --git a/token-metadata/0x21D5A14e625d767Ce6b7A167491C2d18e0785fDa/metadata.json b/token-metadata/0x21D5A14e625d767Ce6b7A167491C2d18e0785fDa/metadata.json "symbol": "JNB",
"address": "0x21D5A14e625d767Ce6b7A167491C2d18e0785fDa",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/app/src/scripts/dataset/tools/index.js b/app/src/scripts/dataset/tools/index.js @@ -34,7 +34,8 @@ class Tools extends React.Component {
isIncomplete = !!dataset.status.incomplete,
isInvalid = !!dataset.status.invalid,
isSnapshot = !!dataset.original,
- isSuperuser = window.localStorage.scitran
+ isSuperuser =
+ window.localStorage.scitran && JSON.parse(window.localStorage.scitran)
? JSON.parse(window.localStorage.scitran).root
: null
| 1 |
diff --git a/src/scripts/markdown-checker.js b/src/scripts/markdown-checker.js @@ -79,23 +79,23 @@ function processFrontmatter(path, lang) {
const frontmatter = matter(file).data
if (!frontmatter.title) {
- console.warn(`Missing 'title' frontmatter at ${path}.`)
+ console.warn(`Missing 'title' frontmatter at ${path}:`)
}
// Description commented out as there are a lot of them missing :-)!
// if (!frontmatter.description) {
- // console.warn(`Missing 'description' frontmatter at ${path}.`)
+ // console.warn(`Missing 'description' frontmatter at ${path}:`)
// }
if (!frontmatter.lang) {
- console.error(`Missing 'lang' frontmatter at ${path}. Expected: ${lang}.'`)
+ console.error(`Missing 'lang' frontmatter at ${path}: Expected: ${lang}:'`)
} else if (!(frontmatter.lang === lang)) {
console.error(
- `Invalid 'lang' frontmatter at ${path}. Expected: ${lang}'. Received: ${frontmatter.lang}.`
+ `Invalid 'lang' frontmatter at ${path}: Expected: ${lang}'. Received: ${frontmatter.lang}.`
)
}
if (path.includes("/tutorials/")) {
if (!frontmatter.published) {
- console.warn(`Missing 'published' frontmatter at ${path}.`)
+ console.warn(`Missing 'published' frontmatter at ${path}:`)
} else {
try {
let stringDate = frontmatter.published.toISOString().slice(0, 10)
@@ -103,12 +103,12 @@ function processFrontmatter(path, lang) {
if (!dateIsFormattedCorrectly) {
console.warn(
- `Invalid 'published' frontmatter at ${path}. Expected: 'YYYY-MM-DD' Received: ${frontmatter.published}`
+ `Invalid 'published' frontmatter at ${path}: Expected: 'YYYY-MM-DD' Received: ${frontmatter.published}`
)
}
} catch (e) {
console.warn(
- `Invalid 'published' frontmatter at ${path}. Expected: 'YYYY-MM-DD' Received: ${frontmatter.published}`
+ `Invalid 'published' frontmatter at ${path}: Expected: 'YYYY-MM-DD' Received: ${frontmatter.published}`
)
}
}
| 14 |
diff --git a/doc/api/app.json b/doc/api/app.json "description": "Fired when the app becomes invisible. Either because another app is in the foreground or the user has returned to the home screen."
},
"terminate": {
- "description": "Fired when the app is being destroyed. After this callback no more interaction with the app is possible."
+ "description": "Fired when the app is being destroyed. After this callback no more interaction with the app is possible.\n\n On Android the terminate event is fired when closing the app via the back navigation or when the system shuts down the app to reclaim memory. In case the app is hard killed by eg. clearing it from the app switcher, the event is not fired.\n\n On iOS the event might not always be fired reliably due to the scheduling behavior of the underlying operating system.\n\nIt is therefore recommended to use the event to clean up resources but not to rely on it for mission critical operations."
},
"keyPress": {
"description": "Fired when a hardware key is pressed. Note that these events stem from physical hardware, not from the virtual keyboard.\n\nWhen invoking `event.preventDefault()` the key event is not propagated to the widget hierarchy. However, a `TextInput` with focus will still receive the key event.",
| 7 |
diff --git a/lib/node_modules/@stdlib/stats/anova1/README.md b/lib/node_modules/@stdlib/stats/anova1/README.md @@ -148,7 +148,7 @@ table = out.print();
## Notes
-- The calculation for the p value is based on an F distribution as indicated on [this website][penn-state].
+- The calculation for the p value is based on [an F distribution][anova-nist].
</section>
@@ -189,7 +189,7 @@ console.log( out.print() );
[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays
-[penn-state]: https://onlinecourses.science.psu.edu/stat502/node/141
+[anova-nist]: https://www.itl.nist.gov/div898/handbook/ppc/section2/ppc231.htm
</section>
| 14 |
diff --git a/_data/conferences.yml b/_data/conferences.yml place: Toronto, Canada
sub: ML
-- title: IJCAI-PRICAI
- hindex: 67
- year: 2020
- id: ijcai-pricai20
- link: https://www.ijcai20.org/
- deadline: '2020-01-21 23:59:59'
- abstract_deadline: '2020-01-15 23:59:59'
- timezone: UTC-12
- date: July 11-17, 2020
- place: Yokohama, Japan
- sub: ML
- note: '<b>NOTE</b>: Mandatory abstract deadline on Jan 15, 2020. More info <a href=''https://www.ijcai19.org/''>here</a>.'
-
- title: SIGGRAPH
hindex: 20
year: 2020
| 2 |
diff --git a/src/components/Table/Table-story.js b/src/components/Table/Table-story.js @@ -336,7 +336,7 @@ class StatefulTableWrapper extends Component {
? state.view.table.selectedIds.concat([id])
: state.view.table.selectedIds.filter(i => i !== id),
},
- isSelectIndeterminate: {
+ isSelectAllIndeterminate: {
$set: !(isClearing || isSelectingAll),
},
isSelectAllSelected: {
@@ -358,7 +358,7 @@ class StatefulTableWrapper extends Component {
selectedIds: {
$set: val ? filteredData.map(i => i.id) : [],
},
- isSelectIndeterminate: {
+ isSelectAllIndeterminate: {
$set: false,
},
},
@@ -452,7 +452,7 @@ storiesOf('Table', module)
},
table: {
isSelectAllSelected: false,
- isSelectIndeterminate: true,
+ isSelectAllIndeterminate: true,
selectedIds: ['row-3', 'row-4', 'row-6', 'row-7'],
},
}}
| 1 |
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml -blank_issues_enabled: false
+blank_issues_enabled: true
contact_links:
- name: Have any issues to discuss regarding CircuitVerse?
url: https://join.slack.com/t/circuitverse-team/shared_invite/enQtNjc4MzcyNDE5OTA3LTdjYTM5NjFiZWZlZGI2MmU1MmYzYzczNmZlZDg5MjYxYmQ4ODRjMjQxM2UyMWI5ODUzODQzMDU2ZDEzNjI4NmE
| 11 |
diff --git a/edit.js b/edit.js @@ -11,8 +11,7 @@ import {XRPackage, pe, renderer, scene, camera, parcelMaterial, floorMesh, proxy
import {downloadFile, readFile, bindUploadFileButton} from 'https://static.xrpackage.org/xrpackage/util.js';
// import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js';
import './gif.js';
-// import {makeTextMesh, makeWristMenu, makeHighlightMesh, makeRayMesh} from './vr-ui.js';
-import {makeTextMesh} from './vr-ui.js';
+import {makeUiMesh} from './vr-ui.js';
import {makeLineMesh, makeTeleportMesh} from './teleport.js';
import {
PARCEL_SIZE,
@@ -1724,6 +1723,9 @@ physicsWorker = pw;
scene.add(guardianMesh);
})();
+const uiMesh = makeUiMesh();
+scene.add(uiMesh);
+
const _makeChunkMesh = (seedString, parcelSize, subparcelSize) => {
const rng = alea(seedString);
const seedNum = Math.floor(rng() * 0xFFFFFF);
| 0 |
diff --git a/src/views/component.njk b/src/views/component.njk {% if not isReadme %}
{% from "breadcrumb/macro.njk" import govukBreadcrumb %}
-{{ govukBreadcrumb(
- classes='',
- [
+
+{{ govukBreadcrumb({
+ "items": [
{ title: 'GOV.UK Frontend', url: '/' },
{ title: componentName | replace("-", " ") | capitalize }
]
-)}}
+}) }}
{% endif %}
<h1 class="govuk-u-heading-36">
| 14 |
diff --git a/src/components/app/App.jsx b/src/components/app/App.jsx @@ -92,33 +92,6 @@ export const App = () => {
};
- const handleShortKeyPress = ( event ) => {
-
- const key = event.detail.key;
-
- switch ( key ) {
-
- case 'z':
-
- if ( AppUIStateManager.state.settings ) break;
- AppUIStateManager.dispatchEvent( new CustomEvent( 'ToggleWorldPanel' ) );
- break;
-
- case 'tab':
-
- if ( AppUIStateManager.state.settings ) break;
- AppUIStateManager.dispatchEvent( new CustomEvent( 'ToggleDioramaPanel' ) );
- break;
-
- case 'esc':
-
- AppUIStateManager.dispatchEvent( new CustomEvent( 'Esc' ) );
- break;
-
- }
-
- };
-
useEffect( () => {
const pushstate = e => {
| 2 |
diff --git a/README.md b/README.md # CyberChef
[](https://travis-ci.org/gchq/CyberChef)
-[](https://www.npmjs.com/package/cyberchef)
-
+[](https://david-dm.org/gchq/CyberChef)
+[](https://david-dm.org/gchq/CyberChef?type=dev)
+[](https://www.npmjs.com/package/cyberchef)
+
+[](https://github.com/gchq/CyberChef/blob/master/LICENSE)
#### *The Cyber Swiss Army Knife*
| 0 |
diff --git a/server/preprocessing/other-scripts/test/doaj-test.R b/server/preprocessing/other-scripts/test/doaj-test.R @@ -5,7 +5,6 @@ library(rstudioapi)
options(warn=1)
wd <- dirname(rstudioapi::getActiveDocumentContext()$path)
-
setwd(wd) #Don't forget to set your working directory
query <- "marketing" #args[2]
@@ -13,27 +12,55 @@ service <- "doaj"
params <- NULL
params_file <- "params_doaj.json"
-source("../vis_layout.R")
-source('../doaj.R')
source('../utils.R')
-
DEBUG = FALSE
+if (DEBUG==TRUE){
+ setup_logging('DEBUG')
+} else {
+ setup_logging('INFO')
+}
+
+tslog <- getLogger('ts')
+
+source("../vis_layout.R")
+source('../doaj.R')
+
MAX_CLUSTERS = 15
-ADDITIONAL_STOP_WORDS = "english"
if(!is.null(params_file)) {
params <- fromJSON(params_file)
}
-#start.time <- Sys.time()
+ADDITIONAL_STOP_WORDS = "english"
+#start.time <- Sys.time()
+failed <- list(params=params)
+tryCatch({
input_data = get_papers(query, params)
+}, error=function(err){
+ tslog$error(gsub("\n", " ", paste("Query failed", service, query, paste(params, collapse=" "), err, sep="||")))
+ failed$query <<- query
+ failed$query_reason <<- err$message
+})
#end.time <- Sys.time()
#time.taken <- end.time - start.time
#time.taken
+tryCatch({
+output_json = vis_layout(input_data$text, input_data$metadata,
+ service,
+ max_clusters=MAX_CLUSTERS,
+ lang="english",
+ add_stop_words=ADDITIONAL_STOP_WORDS, testing=TRUE)
+}, error=function(err){
+ tslog$error(gsub("\n", " ", paste("Processing failed", query, paste(params, collapse=" "), err, sep="||")))
+ failed$query <<- query
+ failed$processing_reason <<- err$message
+})
-output_json = vis_layout(input_data$text, input_data$metadata, max_clusters=MAX_CLUSTERS, add_stop_words=ADDITIONAL_STOP_WORDS, testing=TRUE)
+if (!exists('output_json')) {
+ output_json <- detect_error(failed)
+}
print(output_json)
| 3 |
diff --git a/configs/ueberdosis_tiptap.json b/configs/ueberdosis_tiptap.json "lvl4": ".app__main h4",
"lvl5": ".app__main h5",
"lvl6": ".app__main h6",
- "text": ".app__main p, .app__main li"
+ "text": ".app__main p, .app__main li, .app__main pre, .app__main td"
},
"strip_chars": " .,;:#",
"conversation_id": [
| 7 |
diff --git a/src/scripts/admin-add.js b/src/scripts/admin-add.js @@ -104,20 +104,34 @@ async function askForYN(question, defaultAnswer, persist){
}
//Ask question and get response
-async function askForString(question, minLength, persist){
+async function askForString(question, minLength, persist, regex){
//Sanity check
if(typeof question !== 'string') throw new Error('Expected string for question');
if(typeof minLength === 'undefined') minLength = 0;
if(typeof minLength !== 'number') throw new Error('Expected number for minLength');
if(typeof persist === 'undefined') persist = false;
if(typeof persist !== 'boolean') throw new Error('Expected boolean for persist');
+ if(typeof regex === 'undefined') regex = false;
+ if(typeof regex !== 'string' && typeof regex !== 'boolean') throw new Error('Expected string or boolean for regex');
//Question loop
while(true){
let resp = await rl.questionAsync(`> ${question} `);
+ if(regex !== false){
+ regex = new RegExp(regex);
+ }
if(resp.length >= minLength){
+ if(regex === false || regex.test(resp)){
return resp;
+ }else{
+ console.log(`The username must contain only numbers or letters.`);
+ if(persist){
+ continue;
+ }else{
+ return null;
+ }
+ }
}else{
console.log(`Minimum length is ${minLength}.`);
if(persist){
@@ -196,7 +210,7 @@ printDivider();
//Getting new admin
- let login = (await askForString('Type the username for the new admin:', 6, true)).toLowerCase();
+ let login = (await askForString('Type the username for the new admin:', 6, true, '^[a-zA-Z0-9]+$')).toLowerCase();
let passwd = await askForString('Type the password for the new admin:', 6, true);
let hash = bcrypt.hashSync(passwd, 5);
admins.push({
| 0 |
diff --git a/test/__snapshots__/Modal.spec.js.snap b/test/__snapshots__/Modal.spec.js.snap // Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`<Modal /> renders a modal has children 1`] = `
+exports[`<Modal /> controlled modal with \`open\` prop mounts opened 1`] = `
<Modal
actions={
Array [
@@ -8,7 +8,7 @@ exports[`<Modal /> renders a modal has children 1`] = `
flat={true}
modal="close"
node="button"
- waves="green"
+ waves="light"
>
Close
</Button>,
@@ -16,35 +16,22 @@ exports[`<Modal /> renders a modal has children 1`] = `
}
bottomSheet={false}
fixedFooter={false}
- header="Modal header"
- options={
+ modalOptions={
Object {
"dismissible": true,
"opacity": 0.4,
}
}
- trigger={
- <button>
- click
- </button>
- }
>
<div>
- <button
- onClick={[Function]}
- >
- click
- </button>
<div
className="modal"
- id="modal_1"
+ id="modal_2"
>
<div
className="modal-content"
>
- <h4>
- Modal header
- </h4>
+ <h4 />
<div>
<h1>
Hello
@@ -59,10 +46,10 @@ exports[`<Modal /> renders a modal has children 1`] = `
key=".0"
modal="close"
node="button"
- waves="green"
+ waves="light"
>
<button
- className="btn waves-effect waves-green btn-flat modal-close"
+ className="waves-effect waves-light btn-flat modal-action modal-close"
disabled={false}
>
Close
@@ -74,7 +61,7 @@ exports[`<Modal /> renders a modal has children 1`] = `
</Modal>
`;
-exports[`<Modal /> renders a trigger renders 1`] = `
+exports[`<Modal /> renders a modal has children 1`] = `
<Modal
actions={
Array [
@@ -82,7 +69,7 @@ exports[`<Modal /> renders a trigger renders 1`] = `
flat={true}
modal="close"
node="button"
- waves="green"
+ waves="light"
>
Close
</Button>,
@@ -91,7 +78,7 @@ exports[`<Modal /> renders a trigger renders 1`] = `
bottomSheet={false}
fixedFooter={false}
header="Modal header"
- options={
+ modalOptions={
Object {
"dismissible": true,
"opacity": 0.4,
@@ -111,7 +98,7 @@ exports[`<Modal /> renders a trigger renders 1`] = `
</button>
<div
className="modal"
- id="modal_1"
+ id="modal_0"
>
<div
className="modal-content"
@@ -133,10 +120,10 @@ exports[`<Modal /> renders a trigger renders 1`] = `
key=".0"
modal="close"
node="button"
- waves="green"
+ waves="light"
>
<button
- className="btn waves-effect waves-green btn-flat modal-close"
+ className="waves-effect waves-light btn-flat modal-action modal-close"
disabled={false}
>
Close
@@ -148,6 +135,16 @@ exports[`<Modal /> renders a trigger renders 1`] = `
</Modal>
`;
+exports[`<Modal /> renders a trigger renders 1`] = `
+<div>
+ <button
+ onClick={[Function]}
+ >
+ click
+ </button>
+</div>
+`;
+
exports[`<Modal /> without a trigger renders 1`] = `
<Modal
actions={
@@ -156,7 +153,7 @@ exports[`<Modal /> without a trigger renders 1`] = `
flat={true}
modal="close"
node="button"
- waves="green"
+ waves="light"
>
Close
</Button>,
@@ -164,7 +161,7 @@ exports[`<Modal /> without a trigger renders 1`] = `
}
bottomSheet={false}
fixedFooter={false}
- options={
+ modalOptions={
Object {
"dismissible": true,
"opacity": 0.4,
@@ -174,7 +171,7 @@ exports[`<Modal /> without a trigger renders 1`] = `
<div>
<div
className="modal"
- id="modal_1"
+ id="modal_2"
>
<div
className="modal-content"
@@ -194,10 +191,10 @@ exports[`<Modal /> without a trigger renders 1`] = `
key=".0"
modal="close"
node="button"
- waves="green"
+ waves="light"
>
<button
- className="btn waves-effect waves-green btn-flat modal-close"
+ className="waves-effect waves-light btn-flat modal-action modal-close"
disabled={false}
>
Close
| 13 |
diff --git a/guide/english/python/commenting-code/index.md b/guide/english/python/commenting-code/index.md ---
title: Python Commenting Code
---
+
Comments are used to annotate, describe, or explain code that is complex or difficult to understand. Python will intentionally ignore comments when it compiles to bytecode by the interpreter. <a href='https://www.python.org/dev/peps/pep-0008/#comments' target='_blank' rel='nofollow'>`PEP 8`</a> has a section dealing with comments. They also increase the readablity of code by adding easy and descriptive language for better understanding.
**Block** and **inline** comments start with a `#`, followed by a space before the comment:
@@ -10,7 +11,7 @@ Comments are used to annotate, describe, or explain code that is complex or diff
print('Hello world!') # This is an inline commment.
```
-Python does not include a formal way to write multiline comments. Each line of a comment spanning multiple lines should start with `#` and a space:
+Python does not include a formal way to write multiline comments. Instead, each line of a comment spanning multiple lines should start with `#` and a space:
```python
# This is the first line of a multiline comment.
# This is the second line.
| 7 |
diff --git a/OpenRobertaParent/OpenRobertaServer/src/test/java/de/fhg/iais/roberta/searchMsg/SearchMsgOccurrencesTest.java b/OpenRobertaParent/OpenRobertaServer/src/test/java/de/fhg/iais/roberta/searchMsg/SearchMsgOccurrencesTest.java @@ -3,14 +3,15 @@ package de.fhg.iais.roberta.searchMsg;
import java.io.File;
import java.util.regex.Pattern;
-import org.junit.Test;
+import org.junit.Ignore;
public class SearchMsgOccurrencesTest {
private static final Pattern ALL = Pattern.compile(".+");
- @Test
+ @Ignore
public void testMessageOccurences() throws Exception {
- SearchMsgKeyOccurrences smo = new SearchMsgKeyOccurrences(new File("../../../blockly/robMsg/robMessages.js"), new File("../../../blockly/msg/messages.js"));
+ SearchMsgKeyOccurrences smo =
+ new SearchMsgKeyOccurrences(new File("../../../blockly/robMsg/robMessages.js"), new File("../../../blockly/msg/messages.js"));
smo.search(new File("../OpenRobertaRobot/src/main/java"), ALL);
smo.search(new File("../OpenRobertaServer/src/main/java"), ALL);
smo.search(new File("../RobotArdu/src/main/java"), ALL);
| 8 |
diff --git a/tests/mobileNav.tests.js b/tests/mobileNav.tests.js /* global describe it document before */
import { expect } from 'chai';
-import { hideMobileNav, focusTrap } from '../src/assets/drizzle/scripts/navigation/mobileNav';
+import {
+ hideMobileNav,
+ focusTrap,
+ mobileNav,
+} from '../src/assets/drizzle/scripts/navigation/mobileNav';
describe('hideMobileNav tests', () => {
let nav;
@@ -37,3 +41,16 @@ describe('focusTrap tests', () => {
expect(input === active).eql(true);
});
});
+
+describe('mobile nav tests', () => {
+ let nav;
+
+ before(() => {
+ nav = document.createElement('nav');
+ nav.classList.add('is-active');
+ });
+ it('should not doing anything if nav is not found with the nav CSS class', () => {
+ mobileNav();
+ expect(nav.classList.contains('is-active')).eql(true);
+ });
+});
| 3 |
diff --git a/src/gml/type/GmlTypeCanCastTo.hx b/src/gml/type/GmlTypeCanCastTo.hx @@ -79,6 +79,9 @@ class GmlTypeCanCastTo {
}
case [_, TEither(et2)]: return canCastToAnyOf(from, et2, tpl, imp);
case [TInst(n1, p1, k1), TInst(n2, p2, k2)]: {
+ // allow function->script casts
+ if (k1 == KFunction && n2 == "script") return true;
+
switch (k2) {
// allow bool<->number casts:
case KNumber: if (k1 == KBool) return true;
| 11 |
diff --git a/lib/form/revision.js b/lib/form/revision.js @@ -5,7 +5,10 @@ var form = require('express-form')
module.exports = form(
field('pageForm.path').required(),
- field('pageForm.body').required().custom(function(value) { return value.replace(/\r/g, '\n') }),
+ field('pageForm.body').required().custom(function(value) {
+ // see https://github.com/weseek/growi/issues/463
+ return value.replace(/\r\n?/g, '\n');
+ }),
field('pageForm.currentRevision'),
field('pageForm.grant').toInt().required(),
field('pageForm.grantUserGroupId'),
| 14 |
diff --git a/packages/idyll-document/src/index.js b/packages/idyll-document/src/index.js -
import React from 'react';
import Runtime from './runtime';
import compile from 'idyll-compiler';
-import UserViewPlaceholder from './components/user-view-placeholder';
-export const hashCode = (str) => {
- var hash = 0, i, chr;
+export const hashCode = str => {
+ var hash = 0,
+ i,
+ chr;
if (str.length === 0) return hash;
for (i = 0; i < str.length; i++) {
chr = str.charCodeAt(i);
- hash = ((hash << 5) - hash) + chr;
+ hash = (hash << 5) - hash + chr;
hash |= 0; // Convert to 32bit integer
}
return hash;
};
class IdyllDocument extends React.Component {
-
constructor(props) {
super(props);
this.state = {
@@ -24,15 +23,14 @@ class IdyllDocument extends React.Component {
previousAST: props.ast || [],
hash: '',
error: null
- }
+ };
}
componentDidMount() {
if (!this.props.ast && this.props.markup) {
- compile(this.props.markup, this.props.compilerOptions)
- .then((ast) => {
+ compile(this.props.markup, this.props.compilerOptions).then(ast => {
this.setState({ ast, hash: hashCode(this.props.markup), error: null });
- })
+ });
}
}
@@ -50,7 +48,7 @@ class IdyllDocument extends React.Component {
if (hash !== this.state.hash) {
this.setState({ previousAST: this.state.ast });
compile(newProps.markup, newProps.compilerOptions)
- .then((ast) => {
+ .then(ast => {
this.setState({ previousAST: ast, ast, hash, error: null });
})
.catch(this.componentDidCatch.bind(this));
@@ -61,9 +59,13 @@ class IdyllDocument extends React.Component {
if (!this.state.error) {
return null;
}
- return React.createElement(this.props.errorComponent || 'pre', {
- className: "idyll-document-error"
- }, this.state.error);
+ return React.createElement(
+ this.props.errorComponent || 'pre',
+ {
+ className: 'idyll-document-error'
+ },
+ this.state.error
+ );
}
render() {
@@ -72,19 +74,22 @@ class IdyllDocument extends React.Component {
<Runtime
{...this.props}
key={this.state.hash}
- context={(context) => {
+ context={context => {
this.idyllContext = context;
- typeof this.props.context === 'function' && this.props.context(context);
+ typeof this.props.context === 'function' &&
+ this.props.context(context);
}}
- initialState={this.props.initialState || (this.idyllContext ? this.idyllContext.data() : {})}
+ initialState={
+ this.props.initialState ||
+ (this.idyllContext ? this.idyllContext.data() : {})
+ }
ast={this.props.ast || this.state.ast}
userViewComponent={this.props.userViewComponent}
/>
{this.getErrorComponent()}
</div>
- )
+ );
}
}
-
export default IdyllDocument;
| 2 |
diff --git a/src/automod/SafeSearch.js b/src/automod/SafeSearch.js @@ -43,7 +43,7 @@ export default class SafeSearch {
*/
async detect(message) {
/** @type {import('discord.js').Collection<string, import('discord.js').Attachment>} */
- const images = message.attachments.filter(attachment => attachment.contentType.startsWith('image/'));
+ const images = message.attachments.filter(attachment => attachment.contentType?.startsWith('image/'));
if (!images.size) {
return null;
}
| 8 |
diff --git a/src/apps.json b/src/apps.json "AngularDart"
],
"icon": "AngularJS.svg",
+ "html": [
+ "<(?:div|html)[^>]+ng-app=",
+ "<ng-app"
+ ],
"js": {
"angular": "",
"angular.version.full": "(.*)\\;version:\\1"
| 7 |
diff --git a/assets/js/modules/adsense/components/setup/v2/SetupUseSnippetSwitch.js b/assets/js/modules/adsense/components/setup/v2/SetupUseSnippetSwitch.js @@ -46,12 +46,10 @@ export default function SetupUseSnippetSwitch() {
const hasExistingTag = Boolean( existingTag );
useEffect( () => {
- ( async function () {
if ( hasExistingTag ) {
setUseSnippet( false );
- await saveSettings();
+ saveSettings();
}
- } )();
}, [ hasExistingTag, saveSettings, setUseSnippet ] );
if (
| 2 |
diff --git a/src/components/Alert.js b/src/components/Alert.js @@ -6,14 +6,14 @@ class Alert extends React.Component {
constructor(props) {
super(props);
- this.onDismiss = this.onDismiss.bind(this);
+ this.dismiss = this.dismiss.bind(this);
this.state = {
alertOpen: props.is_open
};
}
- onDismiss() {
+ dismiss() {
if (this.props.setProps) {
this.props.setProps({is_open: false});
} else {
@@ -24,6 +24,15 @@ class Alert extends React.Component {
componentWillReceiveProps(nextProps) {
if (nextProps.is_open != this.state.alertOpen) {
this.setState({alertOpen: nextProps.is_open});
+ if (nextProps.is_open && this.props.duration) {
+ setTimeout(this.dismiss, this.props.duration);
+ }
+ }
+ }
+
+ componentDidMount() {
+ if (this.props.is_open && this.props.duration) {
+ setTimeout(this.dismiss, this.props.duration);
}
}
@@ -38,7 +47,7 @@ class Alert extends React.Component {
return (
<RSAlert
isOpen={this.state.alertOpen}
- toggle={dismissable && this.onDismiss}
+ toggle={dismissable && this.dismiss}
{...otherProps}
data-dash-is-loading={
(loading_state && loading_state.is_loading) || undefined
@@ -51,7 +60,8 @@ class Alert extends React.Component {
}
Alert.defaultProps = {
- is_open: true
+ is_open: true,
+ duration: null
};
Alert.propTypes = {
@@ -106,6 +116,11 @@ Alert.propTypes = {
*/
dismissable: PropTypes.bool,
+ /**
+ * Duration in milliseconds after which the Alert dismisses itself.
+ */
+ duration: PropTypes.number,
+
/**
* Object that holds the loading state object coming from dash-renderer
*/
| 11 |
diff --git a/services/ingest-file/ingestors/email/olm.py b/services/ingest-file/ingestors/email/olm.py @@ -55,6 +55,7 @@ class OutlookOLMArchiveIngestor(Ingestor, TempFileSupport, OPFParser):
if name in self.EXCLUDE:
continue
entity = self.manager.make_entity('Folder', parent=entity)
+ entity.add('fileName', name)
entity.make_id(foreign_id.as_posix())
self.manager.emit_entity(entity)
return entity
| 12 |
diff --git a/src/pages/ReportDetailsPage.js b/src/pages/ReportDetailsPage.js @@ -5,7 +5,7 @@ import Str from 'expensify-common/lib/str';
import _ from 'underscore';
import {View, ScrollView} from 'react-native';
import lodashGet from 'lodash/get';
-import RoomHeaderAvatars from '../components/RoomHeaderAvatars';
+import Avatar from '../components/Avatar';
import compose from '../libs/compose';
import withLocalize, {withLocalizePropTypes} from '../components/withLocalize';
import ONYXKEYS from '../ONYXKEYS';
@@ -103,7 +103,6 @@ class ReportDetailsPage extends Component {
}
render() {
- const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(this.props.report);
const isChatRoom = ReportUtils.isChatRoom(this.props.report);
const chatRoomSubtitle = ReportUtils.getChatRoomSubtitle(this.props.report, this.props.policies);
const participants = lodashGet(this.props.report, 'participants', []);
@@ -132,12 +131,13 @@ class ReportDetailsPage extends Component {
<View
style={styles.reportDetailsTitleContainer}
>
- <View style={styles.mb4}>
- <RoomHeaderAvatars
- avatarIcons={OptionsListUtils.getAvatarSources(this.props.report)}
- shouldShowLargeAvatars={isPolicyExpenseChat}
+ <Avatar
+ isChatRoom={isChatRoom}
+ isArchivedRoom={ReportUtils.isArchivedRoom(this.props.report)}
+ containerStyles={[styles.singleAvatarLarge, styles.mb4]}
+ imageStyles={[styles.singleAvatarLarge]}
+ source={this.props.report.icons[0]}
/>
- </View>
<View style={[styles.reportDetailsRoomInfo, styles.mw100]}>
<View style={[styles.alignSelfCenter, styles.w100]}>
<DisplayNames
| 13 |
diff --git a/src/components/AccountDropdown/AccountDropdown.js b/src/components/AccountDropdown/AccountDropdown.js @@ -77,7 +77,7 @@ class AccountDropdown extends Component {
onLogin = () => {
const keycloak = new Keycloak({
realm: "default",
- clientId: "account",
+ clientId: "reaction-next-starterkit-client",
url: "http://localhost:8080/auth"
});
| 3 |
diff --git a/webpack.config.js b/webpack.config.js @@ -4,7 +4,6 @@ var webpack = require("webpack");
var ProvidePlugin = require('webpack').ProvidePlugin;
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
-var HtmlWebpackPlugin = require('html-webpack-plugin');
var CleanWebpackPlugin = require('clean-webpack-plugin');
var Promise = require('es6-promise').Promise;
require('es6-promise').polyfill();
| 2 |
diff --git a/elements/simple-fields/lib/simple-fields-field.js b/elements/simple-fields/lib/simple-fields-field.js @@ -681,7 +681,8 @@ const SimpleFieldsFieldBehaviors = function (SuperClass) {
? !!this.value
: this.type === "radio"
? this.value === (option || {}).value
- : (this.value || []).includes((option || {}).value),
+ : (this.value || []).includes &&
+ (this.value || []).includes((option || {}).value),
icon = this.getOptionIcon(checked);
return html`
<span class="input-option" part="option-inner">
| 1 |
diff --git a/assets/js/googlesitekit/datastore/user/surveys.js b/assets/js/googlesitekit/datastore/user/surveys.js @@ -108,13 +108,8 @@ const baseActions = {
}
if ( ttl > 0 ) {
setTimeout( () => {
- function* generator() {
// With a positive ttl we cache an empty object to avoid calling fetchTriggerSurvey() again after 30s.
- yield Data.commonActions.await( setItem( cacheKey, {}, { ttl } ) );
- }
-
- const gen = generator();
- gen.next();
+ setItem( cacheKey, {}, { ttl } );
}, 3000 );
}
}
| 2 |
diff --git a/lib/waterline/methods/destroy.js b/lib/waterline/methods/destroy.js @@ -238,10 +238,16 @@ module.exports = function destroy(criteria, done, metaContainer) {
// The only tangible difference is that its criteria has a `select` clause so that
// records only contain the primary key field (by column name, of course.)
var pkColumnName = WLModel.schema[WLModel.primaryKey].columnName;
-
if (!pkColumnName) {
return done(new Error('Consistency violation: model `' + WLModel.identity + '` schema has no primary key column name!'));
}
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // > Note: We have to look up the column name this way (instead of simply using the
+ // > getAttribute() utility) because it is currently only fully normalized on the
+ // > `schema` dictionary-- the model's attributes don't necessarily have valid,
+ // > normalized column names. For more context, see:
+ // > https://github.com/balderdashy/waterline/commit/19889b7ee265e9850657ec2b4c7f3012f213a0ae#commitcomment-20668097
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
adapter.find(WLModel.datastore, {
method: 'find',
| 0 |
diff --git a/tools/make/common.mk b/tools/make/common.mk @@ -101,6 +101,9 @@ JAVASCRIPT_LINTER ?= eslint
# Define the code coverage instrumentation utility:
JAVASCRIPT_CODE_INSTRUMENTER ?= istanbul
+# Define the linter to use when linting TypeScript definition files:
+TYPESCRIPT_DEFINITION_LINTER ?= dtslint
+
# Define the browser test runner:
BROWSER_TEST_RUNNER ?= testling
| 12 |
diff --git a/app/templates/account/billing/invoices/list.hbs b/app/templates/account/billing/invoices/list.hbs <div class="sixteen wide column">
- <Tables::Default
- @columns={{columns}}
- @rows={{model.eventInvoices.data}}
- @currentPage={{page}}
- @pageSize={{per_page}}
- @searchQuery={{search}}
- @sortBy={{sort_by}}
- @sortDir={{sort_dir}}
- @metaData={{model.eventInvoices.meta}}
- @filterOptions={{filterOptions}}
- @widthConstraint="eq-container"
- @resizeMode="fluid"
- @fillMode="equal-column" />
+ {{tables/default columns=columns
+ rows=model.eventInvoices.data
+ currentPage=page
+ pageSize=per_page
+ searchQuery=search
+ sortBy=sort_by
+ sortDir=sort_dir
+ metaData=model.eventInvoices.meta
+ filterOptions=filterOptions
+ widthConstraint="eq-container"
+ resizeMode="fluid"
+ fillMode="equal-column"
+ }}
</div>
\ No newline at end of file
| 13 |
diff --git a/articles/api/management/v2/changes.md b/articles/api/management/v2/changes.md @@ -31,13 +31,13 @@ This document describes the major differences between Auth0's Management API v1
| [GET /api/users](/api/v1#!#get--api-users) | None. | [GET /api/v2/users](/api/v2#!/Users/get_users) |
| [GET /api/users?search={criteria}](/api/v1#!#get--api-users-search--criteria-) | Changed parameter and syntax. | Implemented using Elastic Search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
| [GET /api/users/{user\_id}](/api/v1#!#get--api-users--user_id-) | None. | [GET /api/v2/users/{id}](/api/v2#!/Users/get_users_by_id) also accepts `v2\_id` |
-| [GET /api/connections/{connection}/users](/api/v1#!#get--api-connections--connection--users) | Not available. | TBD. |
-| [GET /api/connections/{connection}/users?search={criteria}](/api/v1#!#get--api-connections--connection--users-search--criteria-) | Not available. | TBD. |
-| [GET /api/enterpriseconnections/users?search={criteria}](/api/v1#!#get--api-enterpriseconnections-users-search--criteria-) | Changed to use search. | Available using `q=identities.isSocial:false AND NOT identities.provider:'auth0'` and `search_engine=v2` in the query string. Other conditions may be added to the search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
-| [GET /api/socialconnections/users?search={criteria}](/api/v1#!#get--api-socialconnections-users-search--criteria-) | Changed to use search. | Available using `q=identities.isSocial:true` and `search_engine=v2` in the query string. Other conditions may be added to the search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
+| [GET /api/connections/{connection}/users](/api/v1#!#get--api-connections--connection--users) | Changed to use search. | Available using `q=identities.connection:"{connection}"` and `search_engine=v3` in the query string. Other conditions may be added to the search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
+| [GET /api/connections/{connection}/users?search={criteria}](/api/v1#!#get--api-connections--connection--users-search--criteria-) | Changed to use search. | Available using `q=identities.connection:"{connection}"` and `search_engine=v3` in the query string. Other conditions and criteria may be added to the search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
+| [GET /api/enterpriseconnections/users?search={criteria}](/api/v1#!#get--api-enterpriseconnections-users-search--criteria-) | Changed to use search. | Available using `q=identities.isSocial:false AND NOT identities.provider:auth0` and `search_engine=v3` in the query string. Other conditions may be added to the search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
+| [GET /api/socialconnections/users?search={criteria}](/api/v1#!#get--api-socialconnections-users-search--criteria-) | Changed to use search. | Available using `q=identities.isSocial:true` and `search_engine=v3` in the query string. Other conditions may be added to the search. See the [get_users](/api/v2#!/Users/get_users) documentation. |
| [GET /api/clients/{client-id}/users](/api/v1#!#get--api-socialconnections-users-search--criteria-) | Not available. | Not available. |
| [POST /api/users](/api/v1#!#post--api-users) | None. | [POST /api/v2/users](/api/v2#!/Users/post_users) |
-| [POST /api/users/{user\_id}/send\_verification\_email](/api/v1#!#post--api-users--user_id--send_verification_email) | Not available. | TBD. |
+| [POST /api/users/{user\_id}/send\_verification\_email](/api/v1#!#post--api-users--user_id--send_verification_email) | Not available. | Verification emails can't be resent once they have been created, but a new one can be generated via [POST /api/v2/tickets/email-verification](/api/v2#!/tickets/post_email_verification)|
| [POST /api/users/{user\_id}/change\_password\_ticket](/api/v1#!#post--api-users--user_id--change_password_ticket) | None. | [POST /api/v2/tickets/password-change](/api/v2#!/tickets/post_password_change) |
| [POST /api/users/{user\_id}/verification\_ticket](/api/v1#!#post--api-users--user_id--verification_ticket) | None. | [POST /api/v2/tickets/email-verification](/api/v2#!/tickets/post_email_verification) |
| [POST /api/users/{user\_id}/publickey](/api/v1#!#post--api-users--user_id--publickey) | Keys are created per device, not per user. | [POST /api/v2/device-credentials](/api/v2#!/Device_Credentials/post_device_credentials) |
| 7 |
diff --git a/webui/src/Visualization.elm b/webui/src/Visualization.elm @@ -200,7 +200,7 @@ spec model =
toVegaLite
[ des
, data []
- , bar []
+ , bar [ maColor "#2fa09d" ]
, columns columnCount
, enc [ ( "facet", Json.Encode.object [ ( "field", Json.Encode.string "category" ), ( "type", Json.Encode.string "ordinal" ) ] ) ]
, config []
| 12 |
diff --git a/ts-defs-src/runner-api/runner-api.d.ts b/ts-defs-src/runner-api/runner-api.d.ts @@ -335,6 +335,14 @@ interface RunOptions {
* Defines whether to disable page caching during test execution.
*/
disablePageCaching: boolean;
+ /**
+ * Specifies the timeout in milliseconds to complete the request for the page's HTML
+ */
+ pageRequestTimeout: number;
+ /**
+ * Specifies the timeout in milliseconds to complete the AJAX requests (XHR or fetch)
+ */
+ ajaxRequestTimeout: number;
}
interface TestCafeFactory {
@@ -343,6 +351,7 @@ interface TestCafeFactory {
port1?: number,
port2?: number,
sslOptions?: TlsOptions,
- developmentMode?: boolean
+ developmentMode?: boolean,
+ retryTestPages?: boolean
): Promise<TestCafe>;
}
| 0 |
diff --git a/src/public/common/search/Search.js b/src/public/common/search/Search.js @@ -91,6 +91,7 @@ const customStyles = {
maxHeight: '500px',
}),
group: base => ({ ...base, padding: 0 }),
+ container: base => ({ ...base, minWidth: '450px' }),
};
class Search extends Component {
| 12 |
diff --git a/src/pages/iou/steps/IOUAmountPage.js b/src/pages/iou/steps/IOUAmountPage.js @@ -139,7 +139,7 @@ class IOUAmountPage extends React.Component {
* @returns {Boolean}
*/
validateAmount(amount) {
- const decimalNumberRegex = new RegExp(/^(?!0{2,})\d+(,\d+)*(\.\d{0,2})?$/, 'i');
+ const decimalNumberRegex = new RegExp(/^\d+(,\d+)*(\.\d{0,2})?$/, 'i');
return amount === '' || (decimalNumberRegex.test(amount) && (parseFloat((amount * 100).toFixed(2)).toString().length <= CONST.IOU.AMOUNT_MAX_LENGTH));
}
| 13 |
diff --git a/assets/js/modules/subscribe-with-google/datastore/constants.js b/assets/js/modules/subscribe-with-google/datastore/constants.js export const STORE_NAME = 'modules/subscribe-with-google';
export { STORE_NAME as MODULES_SUBSCRIBE_WITH_GOOGLE };
-
-// Form ID for the module setup form.
-export const FORM_SETUP = 'subscribeWithGoogleSetup';
| 2 |
diff --git a/package.json b/package.json "grunt-contrib-copy": "1.0.0",
"grunt-shell": "3.0.1",
"grunt-wp-deploy": "2.0.0",
+ "jest-each": "24.8.0",
"lodash": "4.17.14",
"mini-css-extract-plugin": "0.7.0",
"moment": "2.24.0",
| 7 |
diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js @@ -1506,7 +1506,14 @@ define([
*/
Camera.prototype.moveForward = function(amount) {
amount = defaultValue(amount, this.defaultMoveAmount);
+
+ if (this._scene.mapMode2D === MapMode2D.ROTATE) {
+ // 3D mode
this.move(this.direction, amount);
+ } else {
+ // 2D mode
+ zoom2D(this, amount);
+ }
};
/**
@@ -1519,7 +1526,14 @@ define([
*/
Camera.prototype.moveBackward = function(amount) {
amount = defaultValue(amount, this.defaultMoveAmount);
+
+ if (this._scene.mapMode2D === MapMode2D.ROTATE) {
+ // 3D mode
this.move(this.direction, -amount);
+ } else {
+ // 2D mode
+ zoom2D(this, -amount);
+ }
};
/**
| 3 |
diff --git a/src/utils/dom.js b/src/utils/dom.js @@ -26,7 +26,9 @@ import {
append,
prepend,
next,
+ nextAll,
prev,
+ prevAll,
parent,
parents,
closest,
@@ -63,7 +65,9 @@ const Methods = {
append,
prepend,
next,
+ nextAll,
prev,
+ prevAll,
parent,
parents,
closest,
| 0 |
diff --git a/website/modules/examples/RouteConfig.js b/website/modules/examples/RouteConfig.js @@ -7,8 +7,6 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
////////////////////////////////////////////////////////////
// first our route components
-const Main = () => <h2>Main</h2>;
-
const Sandwiches = () => <h2>Sandwiches</h2>;
const Tacos = ({ routes }) => (
| 2 |
diff --git a/README.md b/README.md @@ -14,7 +14,9 @@ PORT=3010
API_URL=http://localhost:3020/graphql
API_WS_URL=ws://localhost:3020/graphql
ASSETS_SERVER_BASE_URL=http://localhost:3021
-# production only
+
+# used for static folder assets and
+# in production as the next.js asset prefix
CDN_FRONTEND_BASE_URL=
```
| 7 |
diff --git a/src/technologies/p.json b/src/technologies/p.json 89
],
"cookies": {
- "pll_language": ""
+ "pll_language": "([a-z]{2})"
},
"description": "Polylang is a WordPress plugin which allows you to create multilingual WordPress site.",
"dom": {
"icon": "Polylang.svg",
"oss": true,
"requires": "WordPress",
+ "pricing": "freemium",
"website": "https://wordpress.org/plugins/polylang"
},
"Polylang Pro": {
89
],
"cookies": {
- "pll_language": ""
+ "pll_language": "([a-z]{2})"
},
"description": "Polylang is a WordPress plugin which allows you to create multilingual WordPress site.",
"dom": {
},
"icon": "Polylang.svg",
"oss": true,
+ "pricing": "low",
"requires": "WordPress",
"website": "https://polylang.pro"
},
| 7 |
diff --git a/src/pages/iou/IOUModal.js b/src/pages/iou/IOUModal.js @@ -311,13 +311,9 @@ class IOUModal extends Component {
createTransaction() {
const reportID = lodashGet(this.props, 'route.params.reportID', '');
- // We use hasSelectedMultipleParticipants instead of props.hasMultipleParticipants because the user can start a Split Bill flow
- // but select a single participant. We should still allow the user to finish the flow, but we should call the appropriate API command
- const hasSelectedMultipleParticipants = this.state.participants.length > 1;
-
// IOUs created from a group report will have a reportID param in the route.
// Since the user is already viewing the report, we don't need to navigate them to the report
- if (hasSelectedMultipleParticipants && CONST.REGEX.NUMBER.test(reportID)) {
+ if (this.props.hasMultipleParticipants && CONST.REGEX.NUMBER.test(reportID)) {
IOU.splitBill(
this.state.participants,
this.props.currentUserPersonalDetails.login,
@@ -330,7 +326,7 @@ class IOUModal extends Component {
}
// If the IOU is created from the global create menu, we also navigate the user to the group report
- if (hasSelectedMultipleParticipants) {
+ if (this.props.hasMultipleParticipants) {
IOU.splitBillAndOpenReport(
this.state.participants,
this.props.currentUserPersonalDetails.login,
| 11 |
diff --git a/articles/support/index.md b/articles/support/index.md @@ -27,3 +27,28 @@ Auth0 offers the following support plans:
<td>For customers with an Enterprise subscription plan that have added the Preferred Support option.</td>
</tr>
</table>
+
+### No Support
+
+Customers with Auth0's free subscription plan can seek support through the Auth0 Community. Response times may vary.
+
+:::panel-info Trial Subscriptions
+New Auth0 customers receive Standard Support during the 22-day trial period (customers may check on how many trial days they have left by logging into the [Dashboard](${manage_url})). If necessary, customers may request a one-day trial extension using the [Auth0 Support Center](https://support.auth0.com/).
+
+At the end of the trial period, customers who have not opted to purchase a paid subscription can use the Auth0 Community for assistance. They will no longer have access to the [Support Center](https://support.auth0.com/).
+:::
+
+### Standard Support
+
+Customers with a paid Auth0 subscription plan receive Standard Support, which offers access to the following channels:
+
+* Auth0 Community;
+* Auth0 Support Center.
+
+The Auth0 Support Center offers ticketed support, where dedicated support specialists are available to provide assistance.
+
+### Enterprise Support (with or without Preferred Support)
+
+Customers with an Enterprise subscription plan receive extended support hours (including an option to add 24/7 availability) with quicker response times, as well as onboarding assistance.
+
+Please contact the [Auth0 Sales Team]([email protected]) if you have specific support requirements or are interested in the Enterprise Support Plan (with or without the Preferred Support option).
| 0 |
diff --git a/app/models/user.rb b/app/models/user.rb @@ -191,8 +191,6 @@ class User < Sequel::Model
errors.add(:org_admin, "cannot be set for non-organization user")
end
- validates_presence :job_role
-
errors.add(:geocoding_quota, "cannot be nil") if geocoding_quota.nil?
errors.add(:here_isolines_quota, "cannot be nil") if here_isolines_quota.nil?
errors.add(:obs_snapshot_quota, "cannot be nil") if obs_snapshot_quota.nil?
| 2 |
diff --git a/src/index.js b/src/index.js @@ -754,10 +754,9 @@ class Offline {
debugLog('_____ RESPONSE PARAMETERS PROCCESSING _____');
debugLog(`Found ${responseParametersKeys.length} responseParameters for '${responseName}' response`);
- responseParametersKeys.forEach(key => {
-
// responseParameters use the following shape: "key": "value"
- const value = responseParameters[key];
+ Object.entries(responseParametersKeys).forEach(([key, value]) => {
+
const keyArray = key.split('.'); // eg: "method.response.header.location"
const valueArray = value.split('.'); // eg: "integration.response.body.redirect.url"
@@ -809,9 +808,9 @@ class Offline {
const endpointResponseHeaders = (endpoint.response && endpoint.response.headers) || {};
- Object.keys(endpointResponseHeaders)
- .filter(key => typeof endpointResponseHeaders[key] === 'string' && /^'.*?'$/.test(endpointResponseHeaders[key]))
- .forEach(key => response.header(key, endpointResponseHeaders[key].slice(1, endpointResponseHeaders[key].length - 1)));
+ Object.entries(endpointResponseHeaders)
+ .filter(([, value]) => typeof value === 'string' && /^'.*?'$/.test(value))
+ .forEach(([key, value]) => response.header(key, value.slice(1, value.length - 1)));
/* LAMBDA INTEGRATION RESPONSE TEMPLATE PROCCESSING */
| 4 |
diff --git a/src/components/Contributors.js b/src/components/Contributors.js @@ -45,16 +45,14 @@ const Contributors = () => {
return (
<Container>
- {contributorsList.map((contributor, idx) => {
- return (
+ {contributorsList.map((contributor, idx) => (
<ContributorCard
key={idx}
image={contributor.avatar_url}
to={contributor.profile}
title={contributor.name}
/>
- )
- })}
+ ))}
</Container>
)
}
| 7 |
diff --git a/packages/yoroi-extension/app/components/wallet/send/WalletSendForm.js b/packages/yoroi-extension/app/components/wallet/send/WalletSendForm.js @@ -446,7 +446,7 @@ export default class WalletSendForm extends Component<Props> {
}).TokenId
}
renderValue={value => (
- <Box>{tokenOptions.filter(option => option.value === value)[0].label}</Box>
+ <Box>{tokenOptions.filter(option => option.value === value)[0]?.label}</Box>
)}
>
<MenuItem
| 9 |
diff --git a/source/datastore/record/Record.js b/source/datastore/record/Record.js @@ -44,9 +44,11 @@ const Record = Class({
this._noSync = false;
this._data = storeKey
? null
- : {
+ : store
+ ? {
accountId: store.getPrimaryAccountIdForType(this.constructor),
- };
+ }
+ : {};
this.store = store;
this.storeKey = storeKey;
| 11 |
diff --git a/rig.js b/rig.js @@ -77,7 +77,7 @@ class RigManager {
this.lastTimetamp = Date.now();
}
- clear() {
+ clearAvatar() {
if (this.localRig) {
this.scene.remove(this.localRig);
this.scene.add(this.localRig.textMesh);
@@ -86,7 +86,7 @@ class RigManager {
}
setDefault() {
- this.clear();
+ this.clearAvatar();
this.localRig = new Avatar(null, {
fingers: true,
@@ -209,7 +209,7 @@ class RigManager {
// await this.localRigQueue.lock();
await this.setAvatar(this.localRig, newLocalRig => {
- this.clear();
+ this.clearAvatar();
this.localRig = newLocalRig;
}, url, ext);
| 10 |
diff --git a/src/file-upload.jsx b/src/file-upload.jsx @@ -48,7 +48,7 @@ class FileUpload extends React.Component {
<div className="ffe-file-upload">
<button
className="ffe-file-upload__button"
- aria-invalid={ !!errorMessage }
+ aria-invalid={ String(!!errorMessage) }
onClick={ this.triggerUploadFileNativeHandler }
>
<span className="ffe-file-upload__button__label-icon" />{ label }
| 12 |
diff --git a/util.js b/util.js @@ -756,3 +756,14 @@ export async function loadAudioBuffer(audioContext, url) {
const audioBuffer = await audioContext.decodeAudioData(arrayBuffer);
return audioBuffer;
}
+export const memoize = fn => {
+ let loaded = false;
+ let cache = null;
+ return () => {
+ if (!loaded) {
+ cache = fn();
+ loaded = true;
+ }
+ return cache;
+ };
+};
\ No newline at end of file
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.