Skip to content

Commit

Permalink
fixed eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed May 19, 2017
1 parent a1c60eb commit f08383b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/wepy-web/src/base.js
Expand Up @@ -8,8 +8,8 @@ import {camelize, hyphenate} from './helper/word';
const pageEvent = ['onLoad', 'onReady', 'onShow', 'onHide', 'onUnload', 'onPullDownRefresh', 'onReachBottom', 'onShareAppMessage'];

const addStyle = (stylelist) => {
let styleElement = document.createElement("style");
let head = document.head || document.getElementsByTagName("head")[0];
let styleElement = document.createElement('style');
let head = document.head || document.getElementsByTagName('head')[0];

let css = '';
stylelist.forEach(id => {
Expand All @@ -19,7 +19,7 @@ const addStyle = (stylelist) => {
let cssNode = document.createTextNode(css);
styleElement.appendChild(cssNode);
head.appendChild(styleElement);
styleElement.type = "text/css";
styleElement.type = 'text/css';
return styleElement;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/wepy-web/src/helper/util.js
Expand Up @@ -13,7 +13,7 @@ export const merge = (elem, defaultOptions) =>{
val = !!val;
break;
case String:
val = val == null ? '' : (typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val));
val = !val ? '' : (typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val));
break;
case Number:
let n = parseFloat(val);
Expand Down
6 changes: 3 additions & 3 deletions packages/wepy-web/src/wx.js
Expand Up @@ -112,15 +112,15 @@ wx.navigateBack = wx.navigateBack ? wx.navigateBack : function navigateBack (o)
/***** System ******/
wx.getSystemInfoSync = wx.getSystemInfoSync ? wx.getSystemInfoSync : function getSystemInfoSync () {
return {
SDKVersion: "0.0.0",
language: "-",
SDKVersion: '0.0.0',
language: '-',
model: browser(),
pixelRatio: 0,
platform: system(),
screenHeight: window.screen.height,
screenWidth: window.screen.width,
system: system(),
version: "0.0.0",
version: '0.0.0',
windowHeight: window.innerHeight,
windowWidth: window.innerWidth
}
Expand Down

0 comments on commit f08383b

Please sign in to comment.