mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-13 21:21:03 +00:00
Update app.js
This commit is contained in:
parent
83665d0696
commit
6fa5711353
4
app.js
4
app.js
|
@ -206,7 +206,9 @@ function __include__(FN) {
|
||||||
*/
|
*/
|
||||||
function require(FN) {
|
function require(FN) {
|
||||||
var cache = require.__cache__ = require.__cache__ || {};
|
var cache = require.__cache__ = require.__cache__ || {};
|
||||||
var suffix = FN.substr(FN.lastIndexOf('.'));
|
var suffix = (function(pos) {
|
||||||
|
return pos < 0 ? '.' : FN.substr(pos);
|
||||||
|
})(FN.lastIndexOf('.'));
|
||||||
|
|
||||||
if ('.js$.coffee$.ls$'.indexOf(suffix + '$') < 0) FN += ".js";
|
if ('.js$.coffee$.ls$'.indexOf(suffix + '$') < 0) FN += ".js";
|
||||||
if (cache[FN]) return cache[FN];
|
if (cache[FN]) return cache[FN];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user