Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't clobber a global _ variable if one exists #443

Merged
merged 1 commit into from
May 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions build/pdfmake.js
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@
}

// valid surrogate pair
codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
Expand Down Expand Up @@ -2022,6 +2022,8 @@
var textDecorator = __webpack_require__(104);
var FontProvider = __webpack_require__(9);

_.noConflict();

////////////////////////////////////////
// PdfPrinter

Expand Down Expand Up @@ -14779,6 +14781,8 @@
var _ = __webpack_require__(7);
var FontWrapper = __webpack_require__(10);

_.noConflict();

function typeName(bold, italics){
var type = 'normal';
if (bold && italics) type = 'bolditalics';
Expand Down Expand Up @@ -14847,6 +14851,8 @@

var _ = __webpack_require__(7);

_.noConflict();

function FontWrapper(pdfkitDoc, path, fontName){
this.MAX_CHAR_TYPES = 92;

Expand Down Expand Up @@ -20426,8 +20432,12 @@

// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {
return Array.isArray(ar);

function isArray(arg) {
if (Array.isArray) {
return Array.isArray(arg);
}
return objectToString(arg) === '[object Array]';
}
exports.isArray = isArray;

Expand Down Expand Up @@ -20467,7 +20477,7 @@
exports.isUndefined = isUndefined;

function isRegExp(re) {
return isObject(re) && objectToString(re) === '[object RegExp]';
return objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;

Expand All @@ -20477,13 +20487,12 @@
exports.isObject = isObject;

function isDate(d) {
return isObject(d) && objectToString(d) === '[object Date]';
return objectToString(d) === '[object Date]';
}
exports.isDate = isDate;

function isError(e) {
return isObject(e) &&
(objectToString(e) === '[object Error]' || e instanceof Error);
return (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;

Expand All @@ -20502,14 +20511,12 @@
}
exports.isPrimitive = isPrimitive;

function isBuffer(arg) {
return Buffer.isBuffer(arg);
}
exports.isBuffer = isBuffer;
exports.isBuffer = Buffer.isBuffer;

function objectToString(o) {
return Object.prototype.toString.call(o);
}

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2).Buffer))

/***/ },
Expand Down
Loading