Socket
Socket
Sign inDemoInstall

lit-element

Package Overview
Dependencies
1
Maintainers
5
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-rc.4 to 2.0.0-rc.5

4

CHANGELOG.md

@@ -18,2 +18,6 @@ # Change Log

## [2.0.0-rc.5] - 2019-01-24
### Fixed
* Fixed a bug causing duplicate styles when an array was returned from `static get styles` ([#480](https://github.com/Polymer/lit-element/issues/480)).
## [2.0.0-rc.4] - 2019-01-24

@@ -20,0 +24,0 @@ ### Added

8

lit-element.js

@@ -60,5 +60,5 @@ /**

const userStyles = this.styles;
let styles = [];
const styles = [];
if (Array.isArray(userStyles)) {
styles = flattenStyles(userStyles);
const flatStyles = flattenStyles(userStyles);
// As a performance optimization to avoid duplicated styling that can

@@ -69,3 +69,3 @@ // occur especially when composing via subclassing, de-duplicate styles

// important that last added styles override previous styles.
const styleSet = styles.reduceRight((set, s) => {
const styleSet = flatStyles.reduceRight((set, s) => {
set.add(s);

@@ -79,3 +79,3 @@ // on IE set.add does not return the set.

else if (userStyles) {
styles = [userStyles];
styles.push(userStyles);
}

@@ -82,0 +82,0 @@ return styles;

{
"name": "lit-element",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"description": "Polymer based lit-html custom element",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -92,5 +92,5 @@ /**

const userStyles = this.styles;
let styles: CSSResult[] = [];
const styles: CSSResult[] = [];
if (Array.isArray(userStyles)) {
styles = flattenStyles(userStyles);
const flatStyles = flattenStyles(userStyles);
// As a performance optimization to avoid duplicated styling that can

@@ -101,3 +101,3 @@ // occur especially when composing via subclassing, de-duplicate styles

// important that last added styles override previous styles.
const styleSet = styles.reduceRight((set, s) => {
const styleSet = flatStyles.reduceRight((set, s) => {
set.add(s);

@@ -110,3 +110,3 @@ // on IE set.add does not return the set.

} else if (userStyles) {
styles = [userStyles];
styles.push(userStyles);
}

@@ -113,0 +113,0 @@ return styles;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc